From bf9de32f41ef07655e5ae65b5072a281198fe6e6 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Fri, 5 May 2006 15:51:13 -0400 Subject: [PATCH] ENH: make release directory a variable --- Utilities/Release/release_cmake.cmake | 7 +++++-- 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 17d71b3af..1b7b1388e 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 021dae8fb..4358f4cd9 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