libtabula

Check-in [342eff75c9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Replaced the bootstrap script with two checks in the src/CMakeLists.txt code for missing querydef.h and ssqls.h files. Also, these genrated files now land in the build directory instead of the source directory when using a separate build dir, as they should.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 342eff75c9af49e7410079f8f5d2c8a193b6958f
User & Date: tangent 2014-09-12 20:00:21
Context
2014-09-12
20:32
Changed the new querydef.h and ssqls.h on-configure generation commands with file targets, which allows us to make these files dependencies of libtabula.so and tells CMake we want the commands run again if the *.pl files are touched. Before, the association between script, header and library was not explicit. This should have secondary benefits, like correct handling of "make install," though this has not been tested. check-in: 0a2ccdefe6 user: tangent tags: trunk
20:00
Replaced the bootstrap script with two checks in the src/CMakeLists.txt code for missing querydef.h and ssqls.h files. Also, these genrated files now land in the build directory instead of the source directory when using a separate build dir, as they should. check-in: 342eff75c9 user: tangent tags: trunk
19:40
Removed more Autotools/Bakefile legacy stuff check-in: 19440cec31 user: tangent tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Deleted bootstrap.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash

# Check for existence of needed tools, so we can give a better error
# message than the shell will.
tools="make cmake"
for tool in $tools
do
	if ! type -p $tool > /dev/null
	then
		echo "FAILED to find build tool '$tool'!"
		echo
		echo BOOTSTRAP FAILED!
		echo
		exit 1
	fi
done

# Build generated header files
(
	cd src
	./querydef.pl
	./ssqls.pl
)

# Ready to rock.  Tell user how to proceed.
cat <<MSG
Source tree set up for building.  You may now proceed to the CMake
step.  For example:

     $ mkdir build
     $ cd build
     $ cmake ..
     $ make
     
MSG
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































Changes to src/CMakeLists.txt.

28
29
30
31
32
33
34














35
36
37
38
39
40
41
# ---------------------
#
# TODO:
#
# - Build querydef.h and ssqls.h automatically
#
# ---------------------















add_library(tabula SHARED
    beemutex.cpp
    cmdline.cpp
    connection.cpp
    cpool.cpp
    datetime.cpp







>
>
>
>
>
>
>
>
>
>
>
>
>
>







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# ---------------------
#
# TODO:
#
# - Build querydef.h and ssqls.h automatically
#
# ---------------------

if (NOT EXISTS "querydef.h")
	message(STATUS "Generating querydef.h...")
	execute_process(
		COMMAND "${CMAKE_SOURCE_DIR}/src/querydef.pl"
		WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src")
endif()

if (NOT EXISTS "ssqls.h")
	message(STATUS "Generating ssqls.h...")
	execute_process(
		COMMAND "${CMAKE_SOURCE_DIR}/src/ssqls.pl"
		WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src")
endif()

add_library(tabula SHARED
    beemutex.cpp
    cmdline.cpp
    connection.cpp
    cpool.cpp
    datetime.cpp