ENH: working on hp
This commit is contained in:
parent
66d7aef82b
commit
9f46c81b45
|
@ -1,4 +1,6 @@
|
||||||
set(PROCESSORS 1)
|
set(PROCESSORS 1)
|
||||||
|
set(RUN_SHELL "/usr/local/bin/zsh -l")
|
||||||
|
set(CVS_COMMAND "/usr/local/bin/cvs")
|
||||||
set(HOST destiny)
|
set(HOST destiny)
|
||||||
set(MAKE "gmake")
|
set(MAKE "gmake")
|
||||||
set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
|
set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
set(CVSROOT ":pserver:anonymous@www.cmake.org:/cvsroot/CMake")
|
set(CVSROOT ":pserver:anonymous@www.cmake.org:/cvsroot/CMake")
|
||||||
get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||||
|
|
||||||
|
if(NOT DEFINED RUN_SHELL)
|
||||||
|
set(RUN_SHELL "/bin/sh")
|
||||||
|
endif(NOT DEFINED RUN_SHELL)
|
||||||
if(NOT DEFINED INSTALLER_SUFFIX)
|
if(NOT DEFINED INSTALLER_SUFFIX)
|
||||||
set(INSTALLER_SUFFIX "*.sh")
|
set(INSTALLER_SUFFIX "*.sh")
|
||||||
endif(NOT DEFINED INSTALLER_SUFFIX)
|
endif(NOT DEFINED INSTALLER_SUFFIX)
|
||||||
|
@ -33,19 +36,26 @@ message("Creating CMake release ${CMAKE_VERSION} on ${HOST} with parallel = ${PR
|
||||||
# define a macro to run a remote command
|
# define a macro to run a remote command
|
||||||
macro(remote_command comment command)
|
macro(remote_command comment command)
|
||||||
message("${comment}")
|
message("${comment}")
|
||||||
execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result)
|
if(${ARGC} GREATER 2)
|
||||||
|
message("ssh ${HOST} ${EXTRA_HOP} ${command}")
|
||||||
|
execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2})
|
||||||
|
else(${ARGC} GREATER 2)
|
||||||
|
message("ssh ${HOST} ${EXTRA_HOP} ${command}")
|
||||||
|
execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result)
|
||||||
|
endif(${ARGC} GREATER 2)
|
||||||
if(${result} GREATER 0)
|
if(${result} GREATER 0)
|
||||||
message(FATAL_ERROR "Error running command: ${command}, return value = ${result}")
|
message(FATAL_ERROR "Error running command: ${command}, return value = ${result}")
|
||||||
endif(${result} GREATER 0)
|
endif(${result} GREATER 0)
|
||||||
endmacro(remote_command)
|
endmacro(remote_command)
|
||||||
|
|
||||||
set(CMAKE_BACKWARDS_COMPATIBILITY 2.4)
|
set(CMAKE_BACKWARDS_COMPATIBILITY 2.4)
|
||||||
configure_file(${SCRIPT_PATH}/release_cmake.sh.in release_cmake-${HOST}.sh)
|
configure_file(${SCRIPT_PATH}/release_cmake.sh.in
|
||||||
|
release_cmake-${HOST}.sh @ONLY)
|
||||||
file(READ release_cmake-${HOST}.sh RELEASE_CMAKE_CONTENTS)
|
file(READ release_cmake-${HOST}.sh RELEASE_CMAKE_CONTENTS)
|
||||||
remote_command("Copy release_cmake-${HOST}.sh to sever"
|
remote_command("Copy release_cmake-${HOST}.sh to sever"
|
||||||
"echo '${RELEASE_CMAKE_CONTENTS}' > release_cmake-${HOST}.sh")
|
"tr -d '\\\\015' > release_cmake-${HOST}.sh" release_cmake-${HOST}.sh)
|
||||||
|
|
||||||
remote_command("Run release script" "sh release_cmake-${HOST}.sh")
|
remote_command("Run release script" "${RUN_SHELL} release_cmake-${HOST}.sh")
|
||||||
|
|
||||||
message("copy the .gz file back from the machine")
|
message("copy the .gz file back from the machine")
|
||||||
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz .
|
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz .
|
||||||
|
|
|
@ -2,17 +2,16 @@
|
||||||
echo "remove and create working directory ~/CMakeReleaseDirectory"
|
echo "remove and create working directory ~/CMakeReleaseDirectory"
|
||||||
rm -rf ~/CMakeReleaseDirectory
|
rm -rf ~/CMakeReleaseDirectory
|
||||||
mkdir ~/CMakeReleaseDirectory
|
mkdir ~/CMakeReleaseDirectory
|
||||||
|
|
||||||
check_exit_value()
|
check_exit_value()
|
||||||
{
|
{
|
||||||
VALUE="$1"
|
VALUE="$1"
|
||||||
if [ "$VALUE" != "0" ]\; then
|
if [ "$VALUE" != "0" ]; then
|
||||||
echo "error in $2"
|
echo "error in $2"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -z "@USER_MAKE_RULE_FILE_CONTENTS@" ]\; then
|
if [ ! -z "@USER_MAKE_RULE_FILE_CONTENTS@" ]; then
|
||||||
echo "@USER_MAKE_RULE_FILE_CONTENTS@" > "@USER_MAKE_RULE_FILE@"
|
echo "@USER_MAKE_RULE_FILE_CONTENTS@" > "@USER_MAKE_RULE_FILE@"
|
||||||
check_exit_value $? "Create User Rule file" || exit 1
|
check_exit_value $? "Create User Rule file" || exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -22,29 +21,29 @@ check_exit_value $? "Remove build tree" || exit 1
|
||||||
mkdir ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build
|
mkdir ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build
|
||||||
check_exit_value $? "Create build directory" || exit 1
|
check_exit_value $? "Create build directory" || exit 1
|
||||||
# make sure directory was created
|
# make sure directory was created
|
||||||
if [ ! -d ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build ]\; then
|
if [ ! -d ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build ]; then
|
||||||
echo "Could not create ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build"
|
echo "Could not create ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build"
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Create initial cache"
|
echo "Create initial cache"
|
||||||
echo "@INITIAL_CACHE@" > ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build/CMakeCache.txt
|
echo "@INITIAL_CACHE@" > ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build/CMakeCache.txt
|
||||||
check_exit_value $? "Create initial cache" || exit 1
|
check_exit_value $? "Create initial cache" || exit 1
|
||||||
|
|
||||||
#echo "Login into cvs."
|
#echo "Login into cvs."
|
||||||
#echo "cmake" | @CVS_COMMAND@ -d ${CVSROOT} login
|
#echo "cmake" | @CVS_COMMAND@ -d @CVSROOT@ login
|
||||||
|
|
||||||
echo "Checkout the source for @CMAKE_VERSION@"
|
echo "Checkout the source for @CMAKE_VERSION@"
|
||||||
cd ~/CMakeReleaseDirectory
|
cd ~/CMakeReleaseDirectory
|
||||||
@CMAKE_CHECKOUT@ -d ${CMAKE_VERSION} CMake
|
@CMAKE_CHECKOUT@ -d @CMAKE_VERSION@ CMake
|
||||||
check_exit_value $? "Checkout cmake source" || exit 1
|
check_exit_value $? "Checkout cmake source" || exit 1
|
||||||
|
|
||||||
cd ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build
|
cd ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build
|
||||||
echo "Run cmake bootstrap --parallel=@PROCESSORS@"
|
echo "Run cmake bootstrap --parallel=@PROCESSORS@"
|
||||||
../${CMAKE_VERSION}/bootstrap --parallel=@PROCESSORS@
|
../@CMAKE_VERSION@/bootstrap --parallel=@PROCESSORS@
|
||||||
check_exit_value $? "Bootstrap cmake" || exit 1
|
check_exit_value $? "Bootstrap cmake" || exit 1
|
||||||
|
|
||||||
echo "Build cmake with ${MAKE}"
|
echo "Build cmake with @MAKE@
|
||||||
@MAKE@
|
@MAKE@
|
||||||
check_exit_value $? "Build cmake" || exit 1
|
check_exit_value $? "Build cmake" || exit 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue