5 echo "remove and create working directory @CMAKE_RELEASE_DIRECTORY@"
6 rm -rf @CMAKE_RELEASE_DIRECTORY@
7 mkdir @CMAKE_RELEASE_DIRECTORY@
12 if [ "$VALUE" != "0" ]; then
18 if [ ! -z "@CC@" ]; then
20 check_exit_value $?
"set CC compiler env var" ||
exit 1
23 if [ ! -z "@FC@" ]; then
25 check_exit_value $?
"set FC compiler env var" ||
exit 1
28 if [ ! -z "@CXX@" ]; then
30 check_exit_value $?
"set CC compiler env var" ||
exit 1
33 if [ ! -z "@LDFLAGS@" ]; then
34 export LDFLAGS
="@LDFLAGS@"
35 check_exit_value $?
"set LDFLAGS env var" ||
exit 1
38 if [ ! -z "@CFLAGS@" ]; then
39 export CFLAGS
="@CFLAGS@"
40 check_exit_value $?
"set CFLAGS env var" ||
exit 1
43 if [ ! -z "@CXXFLAGS@" ]; then
44 export CXXFLAGS
="@CXXFLAGS@"
45 check_exit_value $?
"setCXXFLAGS env var" ||
exit 1
48 if [ ! -z "@USER_MAKE_RULE_FILE_CONTENTS@" ]; then
49 echo "@USER_MAKE_RULE_FILE_CONTENTS@" > "@USER_MAKE_RULE_FILE@"
50 check_exit_value $?
"Create User Rule file" ||
exit 1
52 echo "Create a directory to build in"
53 rm -rf @CMAKE_RELEASE_DIRECTORY@
/@CMAKE_VERSION@
-build
54 check_exit_value $?
"Remove build tree" ||
exit 1
55 mkdir @CMAKE_RELEASE_DIRECTORY@
/@CMAKE_VERSION@
-build
56 check_exit_value $?
"Create build directory" ||
exit 1
57 # make sure directory was created
58 if [ ! -d @CMAKE_RELEASE_DIRECTORY@
/@CMAKE_VERSION@
-build ]; then
59 echo "Could not create @CMAKE_RELEASE_DIRECTORY@/@CMAKE_VERSION@-build"
63 echo "Create initial cache"
64 echo "@INITIAL_CACHE@" > @CMAKE_RELEASE_DIRECTORY@
/@CMAKE_VERSION@
-build/CMakeCache.txt
65 check_exit_value $?
"Create initial cache" ||
exit 1
67 #echo "Login into cvs."
68 #echo "cmake" | @CVS_COMMAND@ -d @CVSROOT@ login
70 echo "Checkout the source for @CMAKE_VERSION@"
71 cd @CMAKE_RELEASE_DIRECTORY@
72 @CMAKE_CHECKOUT@
-d @CMAKE_VERSION@ CMake
73 check_exit_value $?
"Checkout cmake source" ||
exit 1
75 cd @CMAKE_RELEASE_DIRECTORY@
/@CMAKE_VERSION@
-build
77 if [ ! -z "@CONFIGURE_WITH_CMAKE@" ]; then
78 echo "Run cmake to configure cmake"
79 @CMAKE_CONFIGURE_PATH@ ..
/@CMAKE_VERSION@
80 check_exit_value $?
"Configure cmake" ||
exit 1
82 if [ -z "@INSTALL_PREFIX@" ]; then
83 echo "Run cmake bootstrap --parallel=@PROCESSORS@"
84 ..
/@CMAKE_VERSION@
/bootstrap
--parallel=@PROCESSORS@
85 check_exit_value $?
"Bootstrap cmake" ||
exit 1
87 echo "Run cmake bootstrap --prefix=@INSTALL_PREFIX@ --parallel=@PROCESSORS@"
88 ..
/@CMAKE_VERSION@
/bootstrap
--prefix=@INSTALL_PREFIX@
--parallel=@PROCESSORS@
89 check_exit_value $?
"Bootstrap cmake" ||
exit 1
93 echo "Build cmake with @MAKE@"
95 check_exit_value $?
"Build cmake" ||
exit 1
97 if [ -z "@SKIP_TESTS@" ]; then
98 echo "Run cmake tests"
100 check_exit_value $?
"Test cmake" ||
exit 1
103 # loop over binary generators
104 generators
="@CPACK_BINARY_GENERATORS@"
105 for GEN
in $generators; do
106 echo "Create $GEN package"
107 .
/bin
/cpack
-D CMAKE_MAKE_PROGRAM
=@MAKE_PROGRAM@
-G $GEN
108 check_exit_value $?
"Create $GEN package" ||
exit 1
111 # loop over source generators
112 generators
="@CPACK_SOURCE_GENERATORS@"
113 for GEN
in $generators; do
114 echo "Create $GEN package"
115 .
/bin
/cpack
-D CMAKE_MAKE_PROGRAM
=@MAKE_PROGRAM@
-G $GEN --config CPackSourceConfig.cmake
116 check_exit_value $?
"Create $GEN package" ||
exit 1
121 # need to add an extra copy thing here
122 if [ ! -z "@EXTRA_COPY@" ]; then
124 check_exit_value $?
"Extra copy step @EXTRA_COPY@" ||
exit 1