release_cmake.sh.in 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/sh
  2. echo "remove and create working directory ~/CMakeReleaseDirectory"
  3. rm -rf ~/CMakeReleaseDirectory
  4. mkdir ~/CMakeReleaseDirectory
  5. check_exit_value()
  6. {
  7. VALUE="$1"
  8. if [ "$VALUE" != "0" ]\; then
  9. echo "error in $2"
  10. exit 1
  11. fi
  12. }
  13. if [ ! -z "@USER_MAKE_RULE_FILE_CONTENTS@" ]\; then
  14. echo "@USER_MAKE_RULE_FILE_CONTENTS@" > "@USER_MAKE_RULE_FILE@"
  15. check_exit_value $? "Create User Rule file" || exit 1
  16. fi
  17. echo "Create a directory to build in"
  18. rm -rf ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build
  19. check_exit_value $? "Remove build tree" || exit 1
  20. mkdir ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build
  21. check_exit_value $? "Create build directory" || exit 1
  22. # make sure directory was created
  23. if [ ! -d ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build ]\; then
  24. echo "Could not create ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build"
  25. exit -1
  26. fi
  27. echo "Create initial cache"
  28. echo "@INITIAL_CACHE@" > ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build/CMakeCache.txt
  29. check_exit_value $? "Create initial cache" || exit 1
  30. #echo "Login into cvs."
  31. #echo "cmake" | @CVS_COMMAND@ -d ${CVSROOT} login
  32. echo "Checkout the source for @CMAKE_VERSION@"
  33. cd ~/CMakeReleaseDirectory
  34. @CMAKE_CHECKOUT@ -d ${CMAKE_VERSION} CMake
  35. check_exit_value $? "Checkout cmake source" || exit 1
  36. cd ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build
  37. echo "Run cmake bootstrap --parallel=@PROCESSORS@"
  38. ../${CMAKE_VERSION}/bootstrap --parallel=@PROCESSORS@
  39. check_exit_value $? "Bootstrap cmake" || exit 1
  40. echo "Build cmake with ${MAKE}"
  41. @MAKE@
  42. check_exit_value $? "Build cmake" || exit 1
  43. echo "Run cmake tests"
  44. @MAKE@ test
  45. check_exit_value $? "Test cmake" || exit 1
  46. echo "Run package"
  47. @MAKE@ package
  48. check_exit_value $? "Package cmake" || exit 1
  49. echo "Create Tar.gz"
  50. ./bin/cpack -G TGZ
  51. check_exit_value $? "Create TGZ" || exit 1