summaryrefslogtreecommitdiffstats
path: root/Utilities/Release/release_cmake.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-05-03 03:20:02 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-05-03 03:20:02 (GMT)
commit86beb67afdabe09bfe9d8d927dff834db3b7fdd5 (patch)
tree646882b1441923e1fd5b3c8f399dc76c19af49cf /Utilities/Release/release_cmake.cmake
parent38c1ab5cb2734af95b5d640ed88f6bb2f1dd78bc (diff)
downloadCMake-86beb67afdabe09bfe9d8d927dff834db3b7fdd5.zip
CMake-86beb67afdabe09bfe9d8d927dff834db3b7fdd5.tar.gz
CMake-86beb67afdabe09bfe9d8d927dff834db3b7fdd5.tar.bz2
ENH: getting better
Diffstat (limited to 'Utilities/Release/release_cmake.cmake')
-rw-r--r--Utilities/Release/release_cmake.cmake35
1 files changed, 25 insertions, 10 deletions
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake
index 7232131..277ab71 100644
--- a/Utilities/Release/release_cmake.cmake
+++ b/Utilities/Release/release_cmake.cmake
@@ -1,5 +1,9 @@
set(CVSROOT ":pserver:anonymous@www.cmake.org:/cvsroot/CMake")
-# used for -j builds
+get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)
+
+if(NOT DEFINED INSTALLER_SUFFIX)
+ set(INSTALLER_SUFFIX "*.sh")
+endif(NOT DEFINED INSTALLER_SUFFIX)
if(NOT DEFINED PROCESSORS)
set(PROCESSORS 1)
endif(NOT DEFINED PROCESSORS)
@@ -23,7 +27,6 @@ macro(remote_command comment command)
else(${ARGC} GREATER 2)
execute_process(COMMAND ssh ${HOST} ${command} RESULT_VARIABLE result)
endif(${ARGC} GREATER 2)
- message("${result}")
if(${result} GREATER 0)
message(FATAL_ERROR "Error running command: ${command}, return value = ${result}")
endif(${result} GREATER 0)
@@ -33,18 +36,30 @@ endmacro(remote_command)
remote_command(
"remove and create working directory ~/CMakeReleaseDirectory"
"rm -rf ~/CMakeReleaseDirectory && mkdir ~/CMakeReleaseDirectory")
+# create user make rule file
+if(DEFINED USER_MAKE_RULE_FILE_CONTENTS)
+ remote_command("Create ${USER_MAKE_RULE_FILE}"
+ "echo ${USER_MAKE_RULE_FILE_CONTENTS} > ${USER_MAKE_RULE_FILE}" )
+endif(DEFINED USER_MAKE_RULE_FILE_CONTENTS)
+
+# create the build directory
+remote_command(
+ "Create a directory to build in"
+ "rm -rf ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && mkdir ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build")
+# set the initial cache
+if(DEFINED INITIAL_CACHE)
+ remote_command("Create ${USER_MAKE_RULE_FILE}"
+ "echo \"${INITIAL_CACHE}\" > ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build/CMakeCache.txt" )
+endif(DEFINED INITIAL_CACHE)
+
# login to cvs
remote_command(
"Login into cvs."
- "cvs -d ${CVSROOT} login" cmake_login)
+ "cvs -d ${CVSROOT} login" "${SCRIPT_PATH}/cmake_login")
# checkout the source
remote_command(
"Checkout the source for ${CMAKE_VERSION}"
"cd ~/CMakeReleaseDirectory && cvs -q -z3 -d ${CVSROOT} export -r ${CMAKE_VERSION} -d ${CMAKE_VERSION} CMake")
-# create the build directory
-remote_command(
- "Create a directory to build in"
- "rm -rf ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && mkdir ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build")
# now bootstrap cmake
remote_command(
"Run cmake bootstrap --parallel=${PROCESSORS}"
@@ -61,6 +76,7 @@ remote_command(
remote_command(
"Run cmake tests"
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ${MAKE} test")
+
# package cmake with self-extracting shell script
remote_command(
"Package cmake"
@@ -69,10 +85,9 @@ remote_command(
remote_command(
"Package cmake"
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ./bin/cpack -G TGZ")
-
message("copy the .gz file back from the machine")
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz .
RESULT_VARIABLE result)
-message("copy the .sh file back from the machine")
-execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.sh .
+message("copy the ${INSTALLER_SUFFIX} file back from the machine")
+execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/${INSTALLER_SUFFIX} .
RESULT_VARIABLE result)