diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-05-05 19:51:13 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-05-05 19:51:13 (GMT) |
commit | bf9de32f41ef07655e5ae65b5072a281198fe6e6 (patch) | |
tree | 1239eb895b7578c8eda21cc7f8e27e5d87fbbd8f | |
parent | e0924bbb16209f196e970db2f9830467c3e147a6 (diff) | |
download | CMake-bf9de32f41ef07655e5ae65b5072a281198fe6e6.zip CMake-bf9de32f41ef07655e5ae65b5072a281198fe6e6.tar.gz CMake-bf9de32f41ef07655e5ae65b5072a281198fe6e6.tar.bz2 |
ENH: make release directory a variable
-rw-r--r-- | Utilities/Release/release_cmake.cmake | 7 | ||||
-rwxr-xr-x | Utilities/Release/release_cmake.sh.in | 20 |
2 files changed, 15 insertions, 12 deletions
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 17d71b3..1b7b138 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -1,6 +1,9 @@ set(CVSROOT ":pserver:anonymous@www.cmake.org:/cvsroot/CMake") get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH) +if(NOT DEFINED CMAKE_RELEASE_DIRECTORY) + set(CMAKE_RELEASE_DIRECTORY "~/CMakeReleaseDirectory") +endif(NOT DEFINED CMAKE_RELEASE_DIRECTORY) if(NOT DEFINED RUN_SHELL) set(RUN_SHELL "/bin/sh") endif(NOT DEFINED RUN_SHELL) @@ -66,10 +69,10 @@ remote_command("Copy release_cmake-${HOST}.sh to sever" remote_command("Run release script" "${RUN_SHELL} release_cmake-${HOST}.sh") message("copy the .gz file back from the machine") -execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz . +execute_process(COMMAND scp ${HOST}:${CMAKE_RELEASE_DIRECTORY}/${CMAKE_VERSION}-build/*.gz . RESULT_VARIABLE result) message("copy the ${INSTALLER_SUFFIX} file back from the machine") -execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/${INSTALLER_SUFFIX} . +execute_process(COMMAND scp ${HOST}:${CMAKE_RELEASE_DIRECTORY}/${CMAKE_VERSION}-build/${INSTALLER_SUFFIX} . RESULT_VARIABLE result) diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in index 021dae8..4358f4c 100755 --- a/Utilities/Release/release_cmake.sh.in +++ b/Utilities/Release/release_cmake.sh.in @@ -1,7 +1,7 @@ #!/bin/sh -echo "remove and create working directory ~/CMakeReleaseDirectory" -rm -rf ~/CMakeReleaseDirectory -mkdir ~/CMakeReleaseDirectory +echo "remove and create working directory @CMAKE_RELEASE_DIRECTORY@" +rm -rf @CMAKE_RELEASE_DIRECTORY@ +mkdir @CMAKE_RELEASE_DIRECTORY@ check_exit_value() { @@ -31,29 +31,29 @@ if [ ! -z "@USER_MAKE_RULE_FILE_CONTENTS@" ]; then check_exit_value $? "Create User Rule file" || exit 1 fi echo "Create a directory to build in" -rm -rf ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build +rm -rf @CMAKE_RELEASE_DIRECTORY@/@CMAKE_VERSION@-build check_exit_value $? "Remove build tree" || exit 1 -mkdir ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build +mkdir @CMAKE_RELEASE_DIRECTORY@/@CMAKE_VERSION@-build check_exit_value $? "Create build directory" || exit 1 # make sure directory was created -if [ ! -d ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build ]; then - echo "Could not create ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build" +if [ ! -d @CMAKE_RELEASE_DIRECTORY@/@CMAKE_VERSION@-build ]; then + echo "Could not create @CMAKE_RELEASE_DIRECTORY@/@CMAKE_VERSION@-build" exit -1 fi echo "Create initial cache" -echo "@INITIAL_CACHE@" > ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build/CMakeCache.txt +echo "@INITIAL_CACHE@" > @CMAKE_RELEASE_DIRECTORY@/@CMAKE_VERSION@-build/CMakeCache.txt check_exit_value $? "Create initial cache" || exit 1 #echo "Login into cvs." #echo "cmake" | @CVS_COMMAND@ -d @CVSROOT@ login echo "Checkout the source for @CMAKE_VERSION@" -cd ~/CMakeReleaseDirectory +cd @CMAKE_RELEASE_DIRECTORY@ @CMAKE_CHECKOUT@ -d @CMAKE_VERSION@ CMake check_exit_value $? "Checkout cmake source" || exit 1 -cd ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build +cd @CMAKE_RELEASE_DIRECTORY@/@CMAKE_VERSION@-build echo "Run cmake bootstrap --parallel=@PROCESSORS@" ../@CMAKE_VERSION@/bootstrap --parallel=@PROCESSORS@ check_exit_value $? "Bootstrap cmake" || exit 1 |