From 2acd7c07ba9bf2c3ed6e31fe113bda04332cef6a Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Fri, 22 Jun 2007 11:31:35 -0400 Subject: ENH: remove old style release stuff --- CMakeLists.txt | 2 - Utilities/Release/CMake.nsi.in | 188 -------- Utilities/Release/CMakeInstall.bmp | Bin 25820 -> 0 bytes Utilities/Release/MakeRelease.cmake.in | 86 ---- Utilities/Release/README | 68 +-- Utilities/Release/Release.cmake | 63 --- Utilities/Release/cmake_login | 1 - Utilities/Release/cmake_release.sh.in | 767 --------------------------------- Utilities/Release/config_AIX | 9 - Utilities/Release/config_CYGWIN_NT-5.1 | 3 - Utilities/Release/config_Darwin | 13 - Utilities/Release/config_HP-UX | 17 - Utilities/Release/config_IRIX64 | 27 -- Utilities/Release/config_Linux | 19 - Utilities/Release/config_OSF1 | 19 - Utilities/Release/config_SunOS | 23 - Utilities/Release/cygwin-package.sh.in | 161 ------- Utilities/Release/release_dispatch.sh | 37 -- 18 files changed, 17 insertions(+), 1486 deletions(-) delete mode 100644 Utilities/Release/CMake.nsi.in delete mode 100644 Utilities/Release/CMakeInstall.bmp delete mode 100644 Utilities/Release/MakeRelease.cmake.in delete mode 100644 Utilities/Release/Release.cmake delete mode 100755 Utilities/Release/cmake_login delete mode 100755 Utilities/Release/cmake_release.sh.in delete mode 100644 Utilities/Release/config_AIX delete mode 100644 Utilities/Release/config_CYGWIN_NT-5.1 delete mode 100644 Utilities/Release/config_Darwin delete mode 100644 Utilities/Release/config_HP-UX delete mode 100644 Utilities/Release/config_IRIX64 delete mode 100644 Utilities/Release/config_Linux delete mode 100644 Utilities/Release/config_OSF1 delete mode 100644 Utilities/Release/config_SunOS delete mode 100755 Utilities/Release/cygwin-package.sh.in delete mode 100755 Utilities/Release/release_dispatch.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 31cb00c..d029911 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -391,8 +391,6 @@ CONFIGURE_FILE( ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") -# include support for making the release -INCLUDE (${CMake_SOURCE_DIR}/Utilities/Release/Release.cmake) INCLUDE (CMakeCPack.cmake) # setup some Testing support (a macro defined in this file) diff --git a/Utilities/Release/CMake.nsi.in b/Utilities/Release/CMake.nsi.in deleted file mode 100644 index 794edf3..0000000 --- a/Utilities/Release/CMake.nsi.in +++ /dev/null @@ -1,188 +0,0 @@ -; CMake install script designed for a nmake build - -;-------------------------------- -; You must define these values - - !define VERSION "@CMake_VERSION@" - !define PATCH "@CMake_VERSION_PATCH@" - !define INST_DIR "@CMake_INSTALL_TOP@" - -;-------------------------------- -;Variables - - Var MUI_TEMP - Var STARTMENU_FOLDER - -;-------------------------------- -;Include Modern UI - - !include "MUI.nsh" - - ;Default installation folder - InstallDir "$PROGRAMFILES\CMake ${VERSION}" - -;-------------------------------- -; determine admin versus local install -Function .onInit - - ClearErrors - UserInfo::GetName - IfErrors noLM - Pop $0 - UserInfo::GetAccountType - Pop $1 - StrCmp $1 "Admin" 0 +3 - SetShellVarContext all - ;MessageBox MB_OK 'User "$0" is in the Admin group' - Goto done - StrCmp $1 "Power" 0 +3 - SetShellVarContext all - ;MessageBox MB_OK 'User "$0" is in the Power Users group' - Goto done - - noLM: - ;Get installation folder from registry if available - - done: -FunctionEnd - - -;-------------------------------- -;General - - ;Name and file - Name "CMake ${VERSION}" - OutFile "@PROJECT_BINARY_DIR@\cmake-${VERSION}.${PATCH}-win32.exe" - -;-------------------------------- -;Interface Settings - - !define MUI_HEADERIMAGE - !define MUI_ABORTWARNING - -;-------------------------------- -; Define some macro setting for the gui - - !define MUI_HEADERIMAGE_BITMAP "@PROJECT_SOURCE_DIR@\Utilities\Release\@PROJECT_NAME@Install.bmp" - -;-------------------------------- -;Pages - - !insertmacro MUI_PAGE_DIRECTORY - - ;Start Menu Folder Page Configuration - !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" - !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Kitware\CMake ${VERSION}" - !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" - !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER - - !insertmacro MUI_PAGE_INSTFILES - - !insertmacro MUI_UNPAGE_CONFIRM - !insertmacro MUI_UNPAGE_INSTFILES - -;-------------------------------- -;Languages - - !insertmacro MUI_LANGUAGE "English" - -;-------------------------------- -;Installer Sections - -Section "Dummy Section" SecDummy - - ;Use the entire tree produced by the INSTALL target. Keep the - ;list of directories here in sync with the RMDir commands below. - SetOutPath "$INSTDIR" - File /r "${INST_DIR}\bin" - File /r "${INST_DIR}\doc" - File /r "${INST_DIR}\share" - - @NSIS_EXTRA_COMMANDS@ - - ;Store installation folder - WriteRegStr SHCTX "Software\Kitware\CMake ${VERSION}" "" $INSTDIR - - ;Create uninstaller - WriteUninstaller "$INSTDIR\Uninstall.exe" - - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - - ;Create shortcuts - CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" - CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\cmake.lnk" "$INSTDIR\bin\CMakeSetup.exe" - CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe" - - !insertmacro MUI_STARTMENU_WRITE_END - -SectionEnd - - -;-------------------------------- -; determine admin versus local install -Function un.onInit - - ClearErrors - UserInfo::GetName - IfErrors noLM - Pop $0 - UserInfo::GetAccountType - Pop $1 - StrCmp $1 "Admin" 0 +3 - SetShellVarContext all - ;MessageBox MB_OK 'User "$0" is in the Admin group' - Goto done - StrCmp $1 "Power" 0 +3 - SetShellVarContext all - ;MessageBox MB_OK 'User "$0" is in the Power Users group' - Goto done - - noLM: - ;Get installation folder from registry if available - - done: -FunctionEnd - -;-------------------------------- -;Uninstaller Section - -Section "Uninstall" - - ;Remove directories we installed. - ;Keep the list of directories here in sync with the File commands above. - RMDir /r "$INSTDIR\bin" - RMDir /r "$INSTDIR\doc" - RMDir /r "$INSTDIR\share" - - ;Remove the uninstaller itself. - Delete "$INSTDIR\Uninstall.exe" - - ;Remove the installation directory if it is empty. - RMDir "$INSTDIR" - - ; Remove the registry entries. - DeleteRegKey SHCTX "Software\Kitware\CMake ${VERSION}" - - !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP - - Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\cmake.lnk" - - ;Delete empty start menu parent diretories - StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" - - startMenuDeleteLoop: - ClearErrors - RMDir $MUI_TEMP - GetFullPathName $MUI_TEMP "$MUI_TEMP\.." - - IfErrors startMenuDeleteLoopDone - - StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop - startMenuDeleteLoopDone: - - DeleteRegKey /ifempty SHCTX "Software\Kitware\CMake ${VERSION}" - -SectionEnd - - diff --git a/Utilities/Release/CMakeInstall.bmp b/Utilities/Release/CMakeInstall.bmp deleted file mode 100644 index 0d4c1a5..0000000 Binary files a/Utilities/Release/CMakeInstall.bmp and /dev/null differ diff --git a/Utilities/Release/MakeRelease.cmake.in b/Utilities/Release/MakeRelease.cmake.in deleted file mode 100644 index d201c13..0000000 --- a/Utilities/Release/MakeRelease.cmake.in +++ /dev/null @@ -1,86 +0,0 @@ -# this script is designed to be run from a UNIX like shell under Windows -# and has some hard coded assumptions. Do not just randomly run this script -# without looking it over first. - -# Release version number. -SET (TAG - "CMake-@CMake_VERSION_MAJOR@-@CMake_VERSION_MINOR@-@CMake_VERSION_PATCH@") -SET (VERSION - "@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@.@CMake_VERSION_PATCH@") - -SET (SCPID "kitware@public.kitware.com") - -# CVSROOT setting used to check out CMake. -SET (CVSROOT ":pserver:anoncvs@www.cmake.org:/cvsroot/CMake") - -######################################################################### -# commit the configured release.sh file -######################################################################### -IF (COMMIT_UNIX_SCRIPT) - # first copy the file - EXEC_PROGRAM("@CMAKE_COMMAND@" "@PROJECT_SOURCE_DIR@" - ARGS -E copy - "\"@PROJECT_BINARY_DIR@/Utilities/Release/cmake_release.sh\"" - "\"@PROJECT_SOURCE_DIR@/Utilities/Release\"" - ) - # then commit it - EXEC_PROGRAM(cvs "@PROJECT_SOURCE_DIR@" - ARGS commit -m "\"ENH: update revision numbers\"" - "\"@PROJECT_SOURCE_DIR@/Utilities/Release/cmake_release.sh\"" - ) -ENDIF (COMMIT_UNIX_SCRIPT) - -######################################################################### -# build the NSI if requested -######################################################################### -IF (BUILD_NSIW) - EXEC_PROGRAM("@NSIS_MAKENSIS@" - ARGS "\"@PROJECT_BINARY_DIR@/Utilities/Release/@PROJECT_NAME@.nsi\"" - ) - # copy the NSI to the FTP site - EXEC_PROGRAM(scp - ARGS cmake-${VERSION}-win32.exe - ${SCPID}:/projects/FTP/pub/cmake/v@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@ - ) -ENDIF (BUILD_NSIW) - - -######################################################################### -# tag the tree if requested -######################################################################### -IF (TAG_TREE) - EXEC_PROGRAM(cvs "@PROJECT_SOURCE_DIR@" - ARGS tag -F ${TAG}) -ENDIF (TAG_TREE) - -######################################################################### -# build the winzip src file and copy it over -######################################################################### -IF (BUILD_WINZIP) - EXEC_PROGRAM(rm C:/ ARGS -rf @PROJECT_NAME@ ) - EXEC_PROGRAM(cvs C:/ - ARGS -d ${CVSROOT} export -r ${TAG} @PROJECT_NAME@) - EXEC_PROGRAM("@WINZIP_WZZIP@" "C:/@PROJECT_NAME@" - ARGS -r -P cmake-${VERSION}.zip) - EXEC_PROGRAM(scp "C:/@PROJECT_NAME@" - ARGS cmake-${VERSION}.zip - ${SCPID}:/projects/FTP/pub/cmake/v@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@ - ) -ENDIF (BUILD_WINZIP) - -######################################################################### -# build the src tar file and copy it over -######################################################################### -IF (BUILD_TAR) - EXEC_PROGRAM(rm $ENV{HOME} ARGS -rf @PROJECT_NAME@ ) - EXEC_PROGRAM(cvs $ENV{HOME} - ARGS -d ${CVSROOT} export -r ${TAG} @PROJECT_NAME@) - EXEC_PROGRAM(tar $ENV{HOME} - ARGS -cvf cmake-${VERSION}.tar CMake) - EXEC_PROGRAM(gzip $ENV{HOME} - ARGS -f -9 cmake-${VERSION}.tar) - EXEC_PROGRAM(scp $ENV{HOME} - ARGS cmake-${VERSION}.tar.gz - ${SCPID}:/projects/FTP/pub/cmake/v@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@ - ) -ENDIF (BUILD_TAR) diff --git a/Utilities/Release/README b/Utilities/Release/README index 1612a5c..51b2e08 100644 --- a/Utilities/Release/README +++ b/Utilities/Release/README @@ -1,58 +1,24 @@ -1. Update Version information - - change version in CMakeLists.txt - - build on windows, and do a make; make install; make release // this step tags - - this changes cmake_release.sh - * for major release edit Source/cmCPluginAPI.h +To create a cmake release, first test the branch: -2. Update the FAQ with the current release. -3. Update hythloth:~kingb/Nightly/Scripts/util.CMakeWeb to generate web page docs for the new version. +mkdir 2-4 +cd 2-4 +cmake -DCMAKE_VERSION=CMake-2-4 -P ../create-cmake-release.cmake +./create-CMake-2-4.sh +If that works: -NOTES from Brad: +Then tag the minor release: +cvs tag 2-4-7 -The release scripts are located in CMake and ParaView under the Utilities/Release directory. It is important to run the script obtained by checking out a copy of the corresponding release branch from CVS. Here is a summary of how to use them: +Then create a release from the tag: +mkdir 2-4-7 +cd 2-4-7 +cmake -DCMAKE_VERSION=CMake-2-4-7 -P ../create-cmake-release.cmake +./create-CMake-2-4.sh -The release_dispatch.sh script has a list of machine names at the top. When run, this script will automatically ssh to these machines to build the releases. Run it like this: - - -./release_dispatch.sh clean -./release_dispatch.sh binary -./release_dispatch.sh logs - - -The first line will ssh to all the machines and wipe out any existing release build. The second will ssh to the machines and start the release scripts with output going to a log file. The third line will bring up a whole bunch of xterm windows each showing the log from one of the machines. Therefore you should run this from a prompt with access to an X display. Alternatively you can just look at the log files manually. - - -After the logs report the job is complete, then the binaries should be sitting on the local machine in the same directory as the scripts. You can run - - -./cmake_release.sh remote_source localhost - - -to get the source tarballs. Then run - - -./cmake_release.sh upload - - -to upload the files to public in the proper FTP directory. - - -For shannara, the home directory does not have enough disk space to build ParaView. After the "clean" step, you should manually log into the machine and do - - -rm -rf /disk2/ParaViewReleaseRoot -ln -s /disk2/ParaViewReleaseRoot ~/ - - -For the aix build, you need to manually login to the box and checkout a copy of the Utilities/Release directory. Then run the release script by hand: - - -./cmake_release.sh binary_tarball -./paraview_release.sh binary_tarball - - -Then in the release root directory there will be a Tarballs subdirectory with the binaries. - +create-cmake-release.cmake: script to run to create release sh script +Cygwin -> directory that contains cpack cygwin package files used in + CMakeCPack.cmake) +machine_release.cmake : config files for each machine diff --git a/Utilities/Release/Release.cmake b/Utilities/Release/Release.cmake deleted file mode 100644 index 81b6eb3..0000000 --- a/Utilities/Release/Release.cmake +++ /dev/null @@ -1,63 +0,0 @@ -######################################################################### -# Setup release scripts. - -IF(WIN32) - FIND_PROGRAM(NSIS_MAKENSIS NAMES makensis - PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS] - DOC "Where is makensis.exe located" - ) - MARK_AS_ADVANCED(NSIS_MAKENSIS) - FIND_PROGRAM(WINZIP_WZZIP NAMES wzzip - PATHS "C:/Program Files/WinZip" - DOC "Where is makensis.exe located" - ) - MARK_AS_ADVANCED(WINZIP_WZZIP) - STRING(REGEX REPLACE "/" "\\\\" CMake_INSTALL_TOP "${CMAKE_INSTALL_PREFIX}") - SET(NSIS_EXTRA_COMMANDS ";Include system runtime libraries.\n SetOutPath \"$INSTDIR\\bin\"\n") - FOREACH(lib ${CMake_INSTALL_SYSTEM_RUNTIME_LIBS}) - STRING(REGEX REPLACE "/" "\\\\" LIB "${lib}") - SET(NSIS_EXTRA_COMMANDS "${NSIS_EXTRA_COMMANDS} File \"${LIB}\"\n") - ENDFOREACH(lib) - CONFIGURE_FILE( - ${PROJECT_SOURCE_DIR}/Utilities/Release/${PROJECT_NAME}.nsi.in - ${PROJECT_BINARY_DIR}/Utilities/Release/${PROJECT_NAME}.nsi - IMMEDIATE @ONLY) - CONFIGURE_FILE( - ${PROJECT_SOURCE_DIR}/Utilities/Release/cmake_release.sh.in - ${PROJECT_BINARY_DIR}/Utilities/Release/cmake_release.sh - IMMEDIATE @ONLY) -ENDIF(WIN32) - -CONFIGURE_FILE( - ${PROJECT_SOURCE_DIR}/Utilities/Release/MakeRelease.cmake.in - ${PROJECT_BINARY_DIR}/Utilities/Release/MakeRelease.cmake - IMMEDIATE @ONLY) - -IF (NSIS_MAKENSIS AND WINZIP_WZZIP) - # build the NSI - ADD_CUSTOM_TARGET( release - ${CMAKE_COMMAND} -DBUILD_NSIW=1 -DCOMMIT_UNIX_SCRIPT=1 -DTAG_TREE=1 -DBUILD_WINZIP=1 - -P ${PROJECT_BINARY_DIR}/Utilities/Release/MakeRelease.cmake - ) - ADD_CUSTOM_TARGET( release_nsiw - ${CMAKE_COMMAND} -DBUILD_NSIW=1 - -P ${PROJECT_BINARY_DIR}/Utilities/Release/MakeRelease.cmake - ) - ADD_CUSTOM_TARGET( release_winzip - ${CMAKE_COMMAND} -DBUILD_WINZIP=1 - -P ${PROJECT_BINARY_DIR}/Utilities/Release/MakeRelease.cmake - ) -ENDIF (NSIS_MAKENSIS AND WINZIP_WZZIP) - -ADD_CUSTOM_TARGET( release_commit_unix - ${CMAKE_COMMAND} -DCOMMIT_UNIX_SCRIPT=1 - -P ${PROJECT_BINARY_DIR}/Utilities/Release/MakeRelease.cmake - ) -ADD_CUSTOM_TARGET( release_tag - ${CMAKE_COMMAND} -DTAG_TREE=1 - -P ${PROJECT_BINARY_DIR}/Utilities/Release/MakeRelease.cmake - ) -ADD_CUSTOM_TARGET( release_tar - ${CMAKE_COMMAND} -DBUILD_TAR=1 - -P ${PROJECT_BINARY_DIR}/Utilities/Release/MakeRelease.cmake - ) diff --git a/Utilities/Release/cmake_login b/Utilities/Release/cmake_login deleted file mode 100755 index a3ea3e4..0000000 --- a/Utilities/Release/cmake_login +++ /dev/null @@ -1 +0,0 @@ -cmake diff --git a/Utilities/Release/cmake_release.sh.in b/Utilities/Release/cmake_release.sh.in deleted file mode 100755 index a4f0b51..0000000 --- a/Utilities/Release/cmake_release.sh.in +++ /dev/null @@ -1,767 +0,0 @@ -#!/bin/sh -#============================================================================= -# -# Program: CMake - Cross-Platform Makefile Generator -# Module: $RCSfile$ -# Language: C++ -# Date: $Date$ -# Version: $Revision$ -# -# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. -# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even -# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the above copyright notices for more information. -# -#============================================================================= - -# -# CMake UNIX Release Script. -# -# Run with no arguments for documentation. -# - -# Release version number. -TAG="CMake-@CMake_VERSION_MAJOR@-@CMake_VERSION_MINOR@-@CMake_VERSION_PATCH@" -VERSION="@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@.@CMake_VERSION_PATCH@" -CMAKE_VERSION="@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@" -RELEASE="1" -PREVIOUS_VERSION="2.0.6" -PREVIOUS_RELEASE="1" - -# CVSROOT setting used to check out CMake. -CVSROOT=":pserver:anonymous@www.cmake.org:/cvsroot/CMake" -CVSROOT_GREP=":pserver:anonymous@www.cmake.org:[0-9]*/cvsroot/CMake" - -# CMake release root directory. -RELEASE_ROOT_NAME="CMakeReleaseRoot" -RELEASE_ROOT="${HOME}/${RELEASE_ROOT_NAME}" -INSTALL_DIR="Install" - -# Installation prefix used during tarball creation. Tarballs are -# relative to the installation prefix and do not include this in their -# paths. -PREFIX="/usr/local" - -# Directory relative to PREFIX where documentation should be placed. -DOC_DIR="/doc/cmake" - -# No default compiler. The config file must provide it. -CC="" -CXX="" -CFLAGS="" -CXXFLAGS="" - -# Provide a default make and build flags. -MAKE="make" -BUILD_FLAGS="" -BOOTSTRAP_FLAGS="" - -# Details of remote invocation. -[ -z "$REMOTE" ] && SELF="$0" - -#----------------------------------------------------------------------------- -usage() -{ - cat < clean - - Create binary release tarball: - - $0 remote_binary - - Create source release tarball: - - $0 remote_source - - Upload tarballs: - - $0 upload - - Create and upload cygwin package: - - $0 cygwin_package - $0 cygwin_upload - -Available commands: - -EOF - cat "$0" | awk ' -/^#--*$/ { doc=1; text="" } - -/(^#$|^#[^-].*$)/ { - if(doc) - { - if(text != "") { text = sprintf("%s %s\n", text, $0) } - else { text = sprintf(" %s\n", $0) } - } -} - -/^[A-Za-z0-9_]*\(\)$/ { - doc=0; - if(text != "") { printf("%s:\n%s\n", $0, text) } -} -' -} - -#----------------------------------------------------------------------------- -error_log() -{ - echo "An error has been logged to $1:" && - cat "$1" && - return 1 -} - -#----------------------------------------------------------------------------- -check_host() -{ - HOST="$1" - if [ -z "$HOST" ]; then - echo "Must specify host." - return 1 - fi -} - -#----------------------------------------------------------------------------- -# Run a command on the specified remote host. -# -# remote [command] -# -# Only one level of remote invocation is allowed. The -# specification must be a valid ssh destination with public -# key authentication and no password. -remote() -{ - if [ ! -z "$REMOTE" ]; then - echo "Cannot do recursive remote calls." - return 1 - fi - check_host "$1" || return 1 - shift - RTASK="'$1'"; shift; for i in "$@"; do RTASK="${RTASK} '$i'"; done - RESULT=0 - echo "------- Running remote task on $HOST. -------" && - (echo "REMOTE=\"1\"" && - (echo TASK=\"`(eval echo '${RTASK}') | (sed 's/"/\\\\"/g')`\") && - cat $SELF) | ssh -e none "$HOST" /bin/sh || RESULT=1 - echo "-------- Remote task on $HOST done. --------" && - return $RESULT -} - -#----------------------------------------------------------------------------- -# Copy tarballs from the specified host. -# -# remote_copy [EXPR] -# -# The specification must be a valid ssh destination -# with public key authentication and no password. Only -# files matching the given expression are copied. If -# no expression is given, "*" is used. -remote_copy() -{ - check_host "$1" || return 1 - EXPR="$2" - [ ! -z "$EXPR" ] || EXPR="*" - echo "------- Copying tarballs from $HOST. -------" && - scp "$HOST:${RELEASE_ROOT_NAME}/Tarballs/${EXPR}" . && - echo "---- Done copying tarballs from $HOST. -----" -} - -#----------------------------------------------------------------------------- -remote_copy_source() -{ - check_host "$1" || return 1 - remote_copy "$HOST" "cmake-${VERSION}.tar*" -} - -#----------------------------------------------------------------------------- -remote_copy_binary() -{ - check_host "$1" || return 1 - remote_copy "$HOST" "cmake-${VERSION}-*" -} - -#----------------------------------------------------------------------------- -# Create source tarballs on the specified host and copy them locally. -# -# remote_source -# -# The specification must be a valid ssh destination -# with public key authentication and no password. -remote_source() -{ - check_host "$1" || return 1 - remote "$HOST" source_tarball && - remote_copy_source "$HOST" -} - -#----------------------------------------------------------------------------- -# Create binary tarballs on the specified host and copy them locally. -# -# remote_binary -# -# The specification must be a valid ssh destination -# with public key authentication and no password. -remote_binary() -{ - check_host "$1" || return 1 - remote "$HOST" binary_tarball && - remote_copy_binary "$HOST" -} - -#----------------------------------------------------------------------------- -# Upload any tarballs in the current directory to the CMake FTP site. -# -# upload -# -# The user must be able to ssh to kitware@www.cmake.org with public -# key authentication and no password. -upload() -{ - echo "------- Copying tarballs to www.cmake.org. -------" - scp cmake-${VERSION}*tar.* kitware@www.cmake.org:/projects/FTP/pub/cmake/v${CMAKE_VERSION} - echo "---- Done copying tarballs to www.cmake.org. -----" -} - -#----------------------------------------------------------------------------- -setup() -{ - [ -z "${DONE_setup}" ] || return 0 ; DONE_setup="yes" - mkdir -p ${RELEASE_ROOT}/Logs && - echo "Entering ${RELEASE_ROOT}" && - cd ${RELEASE_ROOT} -} - -#----------------------------------------------------------------------------- -# Remove the release root directory. -# -# clean -# -clean() -{ - cd "${HOME}" && - echo "Cleaning up ${RELEASE_ROOT}" && - rm -rf ${RELEASE_ROOT_NAME}/* -} - -#----------------------------------------------------------------------------- -cvs_login() -{ - [ -z "${DONE_cvs_login}" ] || return 0 ; DONE_cvs_login="yes" - setup || return 1 - ( - if [ -f "${HOME}/.cvspass" ]; then - CVSPASS="${HOME}/.cvspass" - else - CVSPASS="" - fi - if [ -z "`grep \"$CVSROOT_GREP\" ${CVSPASS} /dev/null`" ]; then - echo "cmake" | cvs -q -z3 -d $CVSROOT login - else - echo "Already logged in." - fi - ) >Logs/cvs_login.log 2>&1 || error_log Logs/cvs_login.log -} - -#----------------------------------------------------------------------------- -utilities() -{ - [ -z "${DONE_utilities}" ] || return 0 ; DONE_utilities="yes" - cvs_login || return 1 - ( - if [ -d "ReleaseUtilities/CVS" ]; then - cd ReleaseUtilities && cvs -z3 -q update -dAP -r ${TAG} - else - rm -rf CheckoutTemp && - mkdir CheckoutTemp && - cd CheckoutTemp && - cvs -q -z3 -d $CVSROOT co -r ${TAG} CMake/Utilities/Release && - mv CMake/Utilities/Release ../ReleaseUtilities && - cd .. && - rm -rf CheckoutTemp - fi - ) >Logs/utilities.log 2>&1 || error_log Logs/utilities.log -} - -#----------------------------------------------------------------------------- -config() -{ - [ -z "${DONE_config}" ] || return 0 ; DONE_config="yes" - utilities || return 1 - CONFIG_FILE="config_`uname`" - echo "Loading ${CONFIG_FILE} ..." - . "${RELEASE_ROOT}/ReleaseUtilities/${CONFIG_FILE}" >Logs/config.log 2>&1 || error_log Logs/config.log - if [ -z "${CC}" ] || [ -z "${CXX}" ] || [ -z "${PLATFORM}" ]; then - echo "${CONFIG_FILE} should specify CC, CXX, and PLATFORM." && - return 1 - fi - export CC CXX CFLAGS CXXFLAGS LDFLAGS PATH LD_LIBRARY_PATH MAKE -} - -#----------------------------------------------------------------------------- -checkout() -{ - [ -z "${DONE_checkout}" ] || return 0 ; DONE_checkout="yes" - config || return 1 - echo "Updating CMake from cvs ..." && - ( - if [ -d cmake-${VERSION}/CVS ]; then - cd cmake-${VERSION} && - cvs -q -z3 -d $CVSROOT update -dAP -r ${TAG} - else - rm -rf cmake-${VERSION} && - rm -rf CheckoutTemp && - mkdir CheckoutTemp && - cd CheckoutTemp && - cvs -q -z3 -d $CVSROOT co -r ${TAG} CMake && - mv CMake ../cmake-${VERSION} && - cd .. && - rm -rf CheckoutTemp - fi - ) >Logs/checkout.log 2>&1 || error_log Logs/checkout.log -} - -#----------------------------------------------------------------------------- -# Create source tarballs for CMake. -# -# source_tarball -# -source_tarball() -{ - [ -z "${DONE_source_tarball}" ] || return 0 ; DONE_source_tarball="yes" - config || return 1 - [ -d "cmake-${VERSION}" ] || checkout || return 1 - echo "Creating source tarballs ..." && - ( - mkdir -p Tarballs && - rm -rf Tarballs/cmake-${VERSION}.tar* && - tar cvf Tarballs/cmake-${VERSION}.tar --exclude CVS cmake-${VERSION} && - gzip -c Tarballs/cmake-${VERSION}.tar >Tarballs/cmake-${VERSION}.tar.gz && - compress Tarballs/cmake-${VERSION}.tar - ) >Logs/source_tarball.log 2>&1 || error_log Logs/source_tarball.log -} - -#----------------------------------------------------------------------------- -write_cache() -{ - write_standard_cache -} - -#----------------------------------------------------------------------------- -write_standard_cache() -{ - cat > CMakeCache.txt <Logs/cache.log 2>&1 || error_log Logs/cache.log -} - -#----------------------------------------------------------------------------- -configure() -{ - [ -z "${DONE_configure}" ] || return 0 ; DONE_configure="yes" - config || return 1 - [ -d "cmake-${VERSION}" ] || checkout || return 1 - cache || return 1 - echo "Running bootstrap ..." && - ( - cd "cmake-${VERSION}-${PLATFORM}" && - ../cmake-${VERSION}/bootstrap --prefix=${PREFIX} ${BOOTSTRAP_FLAGS} - ) >Logs/configure.log 2>&1 || error_log Logs/configure.log -} - -#----------------------------------------------------------------------------- -build() -{ - [ -z "${DONE_build}" ] || return 0 ; DONE_build="yes" - config || return 1 - if [ ! -d "cmake-${VERSION}-${PLATFORM}/Bootstrap" ]; then - configure || return 1 - fi - echo "Running make ..." && - ( - cd "cmake-${VERSION}-${PLATFORM}" && - ${MAKE} ${BUILD_FLAGS} - ) >Logs/build.log 2>&1 || error_log Logs/build.log -} - -#----------------------------------------------------------------------------- -tests() -{ - [ -z "${DONE_tests}" ] || return 0 ; DONE_tests="yes" - config || return 1 - [ -f "cmake-${VERSION}-${PLATFORM}/bin/ccmake" ] || build || return 1 - echo "Running tests ..." && - ( - cd "cmake-${VERSION}-${PLATFORM}" && - rm -rf Tests && - ./bin/ctest -V - ) >Logs/tests.log 2>&1 || error_log Logs/tests.log -} - -#----------------------------------------------------------------------------- -install() -{ - [ -z "${DONE_install}" ] || return 0 ; DONE_install="yes" - config || return 1 - [ -d "cmake-${VERSION}-${PLATFORM}/Tests/Simple" ] || tests || return 1 - echo "Running make install ..." && - ( - rm -rf ${INSTALL_DIR} && - cd "cmake-${VERSION}-${PLATFORM}" && - ${MAKE} install DESTDIR="${RELEASE_ROOT}/${INSTALL_DIR}" - ) >Logs/install.log 2>&1 || error_log Logs/install.log -} - -#----------------------------------------------------------------------------- -strip() -{ - [ -z "${DONE_strip}" ] || return 0 ; DONE_strip="yes" - config || return 1 - [ -f "${INSTALL_DIR}/usr/local/bin/ccmake" ] || install || return 1 - echo "Stripping executables ..." && - ( - strip ${INSTALL_DIR}${PREFIX}/bin/* - ) >Logs/strip.log 2>&1 || error_log Logs/strip.log -} - -#----------------------------------------------------------------------------- -manifest() -{ - [ -z "${DONE_manifest}" ] || return 0 ; DONE_manifest="yes" - config || return 1 - [ -f "${INSTALL_DIR}/usr/local/bin/ccmake" ] || install || return 1 - echo "Writing MANIFEST ..." && - ( - mkdir -p ${INSTALL_DIR}${PREFIX}${DOC_DIR} && - rm -rf ${INSTALL_DIR}${PREFIX}${DOC_DIR}/MANIFEST && - touch ${INSTALL_DIR}${PREFIX}${DOC_DIR}/MANIFEST && - cd ${INSTALL_DIR}${PREFIX} && - FILES=`find . -type f |sed 's/^\.\///'` && - cd ${RELEASE_ROOT} && - (cat >> ${INSTALL_DIR}${PREFIX}${DOC_DIR}/MANIFEST < ${INSTALL_DIR}/README <Logs/manifest.log 2>&1 || error_log Logs/manifest.log -} - -#----------------------------------------------------------------------------- -# Create binary tarballs for CMake. -# -# binary_tarball -# -binary_tarball() -{ - [ -z "${DONE_binary_tarball}" ] || return 0 ; DONE_binary_tarball="yes" - config || return 1 - strip || return 1 - manifest || return 1 - echo "Creating binary tarballs ..." && - ( - mkdir -p Tarballs && - rm -rf ${INSTALL_DIR}/cmake-${VERSION}-${PLATFORM}-files.tar && - ( - cd ${INSTALL_DIR}${PREFIX} && - tar cvf ${RELEASE_ROOT}/${INSTALL_DIR}/cmake-${VERSION}-${PLATFORM}-files.tar * - ) && - rm -rf Tarballs/cmake-${VERSION}-${PLATFORM}.tar* && - ( - cd ${INSTALL_DIR} && - tar cvf ${RELEASE_ROOT}/Tarballs/cmake-${VERSION}-${PLATFORM}.tar cmake-${VERSION}-${PLATFORM}-files.tar README - ) && - ( - cd Tarballs && - gzip -c cmake-${VERSION}-${PLATFORM}.tar >cmake-${VERSION}-${PLATFORM}.tar.gz && - compress cmake-${VERSION}-${PLATFORM}.tar - ) - ) >Logs/binary_tarball.log 2>&1 || error_log Logs/binary_tarball.log -} - -#----------------------------------------------------------------------------- -cygwin_source_tarball() -{ - [ -z "${DONE_cygwin_source_tarball}" ] || return 0 ; DONE_cygwin_source_tarball="yes" - config || return 1 - [ -d "cmake-${VERSION}" ] || checkout || return 1 - echo "Creating cygwin source tarball ..." && - ( - mkdir -p Cygwin && - rm -rf Cygwin/cmake-${VERSION}.tar.bz2 && - tar cvjf Cygwin/cmake-${VERSION}.tar.bz2 --exclude CVS cmake-${VERSION} - ) >Logs/cygwin_source_tarball.log 2>&1 || error_log Logs/cygwin_source_tarball.log -} - -#----------------------------------------------------------------------------- -cygwin_source_patch() -{ - [ -z "${DONE_cygwin_source_patch}" ] || return 0 ; DONE_cygwin_source_patch="yes" - config || return 1 - [ -d "cmake-${VERSION}" ] || checkout || return 1 - echo "Creating source patch for cygwin ..." && - ( - mkdir -p Cygwin && - rm -rf Cygwin/Patched && - mkdir -p Cygwin/Patched && - (tar c --exclude CVS cmake-${VERSION} | (cd Cygwin/Patched; tar x)) && - cd Cygwin/Patched && - mkdir -p cmake-${VERSION}/CYGWIN-PATCHES && - ( - CYGVERSION=`uname -r` - cat > cmake-${VERSION}/CYGWIN-PATCHES/cmake.README < - -EOF - ) && - ( - cat > cmake-${VERSION}/CYGWIN-PATCHES/setup.hint < "../cmake-${VERSION}-${RELEASE}.patch"; [ "$?" = "1" ]) - ) >Logs/cygwin_source_patch.log 2>&1 || error_log Logs/cygwin_source_patch.log -} - -#----------------------------------------------------------------------------- -cygwin_package_script() -{ - [ -z "${DONE_cygwin_package_script}" ] || return 0 ; DONE_cygwin_package_script="yes" - utilities || return 1 - echo "Creating cygwin packaging script ..." && - ( - mkdir -p Cygwin && - cp ReleaseUtilities/cygwin-package.sh.in Cygwin/cmake-${VERSION}-${RELEASE}.sh && - chmod u+x Cygwin/cmake-${VERSION}-${RELEASE}.sh - ) >Logs/cygwin_package_script.log 2>&1 || error_log Logs/cygwin_package_script.log -} - -#----------------------------------------------------------------------------- -# Create the CMake cygwin package files. -# -# cygwin_package -# -# This command should be run from a cygwin prompt. -cygwin_package() -{ - [ -z "${DONE_cygwin_package}" ] || return 0 ; DONE_cygwin_package="yes" - config || return 1 - [ -f "Cygwin/cmake-${VERSION}.tar.bz2" ] || cygwin_source_tarball || return 1 - [ -f "Cygwin/cmake-${VERSION}-${RELEASE}.patch" ] || cygwin_source_patch || return 1 - [ -f "Cygwin/cmake-${VERSION}-${RELEASE}.sh" ] || cygwin_package_script || return 1 - echo "Running cygwin packaging script ..." && - ( - rm -rf Cygwin/Package && - mkdir -p Cygwin/Package && - cd Cygwin/Package && - cp ../setup.hint . && - cp ../cmake-${VERSION}.tar.bz2 . && - cp ../cmake-${VERSION}-${RELEASE}.patch . && - cp ../cmake-${VERSION}-${RELEASE}.sh . && - ./cmake-${VERSION}-${RELEASE}.sh all - ) >Logs/cygwin_package.log 2>&1 || error_log Logs/cygwin_package.log -} - -#----------------------------------------------------------------------------- -# Upload the CMake cygwin package files. -# -# cygwin_upload -# -# This should be run after "cygwin_package". -cygwin_upload() -{ - setup || return 1 - echo "------- Copying cywgin packages to www.cmake.org. -------" - scp Cygwin/Package/cmake-${VERSION}-${RELEASE}-src.tar.bz2 \ - Cygwin/Package/cmake-${VERSION}-${RELEASE}.tar.bz2 \ - Cygwin/Package/setup.hint \ - kitware@www.cmake.org:/projects/FTP/pub/cmake/cygwin - echo "---- Done copying cygwin packages to www.cmake.org. -----" -} - -#----------------------------------------------------------------------------- -win32_zipfile() -{ - setup || return 1 - echo "Creating windows non-admin install zip file ..." && - ( - mkdir -p Win32 && - cd "c:/Program Files" && - rm -rf cmake-${VERSION}-x86-win.zip && - zip -r cmake-${VERSION}-x86-win.zip CMake \ - -x CMake/INSTALL.LOG -x CMake/UNWISE.EXE -x CMake/WiseUpdt.exe && - mv cmake-${VERSION}-x86-win.zip ${RELEASE_ROOT}/Win32 - ) >Logs/win32_zipfile.log 2>&1 || error_log Logs/win32_zipfile.log -} - -#----------------------------------------------------------------------------- -win32_upload() -{ - setup || return 1 - echo "------- Copying windows zip file to www.cmake.org. -------" - scp Win32/cmake-${VERSION}-x86-win.zip \ - kitware@www.cmake.org:/projects/FTP/pub/cmake/v${CMAKE_VERSION} - echo "---- Done copying windows zip file to www.cmake.org. -----" -} - -#----------------------------------------------------------------------------- -# Install CMake into the OSX package directory structure. -# -# osx_install -# -# This will build CMake if it is not already built. -osx_install() -{ - [ -z "${DONE_osx_install}" ] || return 0 ; DONE_osx_install="yes" - config || return 1 - [ -f "cmake-${VERSION}-${PLATFORM}/bin/ccmake" ] || build || return 1 - if [ -z "${WX_RESOURCES}" ]; then - echo "${CONFIG_FILE} should specify WX_RESOURCES." - return 1 - fi - echo "Running make install for OSX package ..." && - ( - rm -rf OSX && - mkdir -p OSX/Resources && - ( - cd "cmake-${VERSION}-${PLATFORM}" && - ${MAKE} install DESTDIR="${RELEASE_ROOT}/OSX/Package_Root" - ) && - cp cmake-${VERSION}/Copyright.txt OSX/Resources/License.txt - ) >Logs/osx_install.log 2>&1 || error_log Logs/osx_install.log -# Use this version when the wxCMakeSetup dialog is restored: -# ( -# rm -rf OSX && -# mkdir -p OSX/Resources && -# mkdir -p OSX/Package_Root/Applications && -# ( -# cd "cmake-${VERSION}-${PLATFORM}" && -# ${MAKE} install DESTDIR="${RELEASE_ROOT}/OSX/Package_Root" -# ) && -# cp cmake-${VERSION}/Copyright.txt OSX/Resources/License.txt && -# cp -r cmake-${VERSION}-${PLATFORM}/bin/CMake.app OSX/Package_Root/Applications && -# echo "APPL????" > OSX/Package_Root/Applications/CMake.app/Contents/PkgInfo && -# cp "${WX_RESOURCES}" OSX/Package_Root/Applications/CMake.app/Contents/Resources/wxCMakeSetup.rsrc -# ) >Logs/osx_install.log 2>&1 || error_log Logs/osx_install.log -} - -#----------------------------------------------------------------------------- -run() -{ - CMD="'$1'"; shift; for i in "$@"; do CMD="${CMD} '$i'"; done - eval "$CMD" -} - -# Determine task and evaluate it. -if [ -z "$TASK" ] && [ -z "$REMOTE" ] ; then - if [ -z "$1" ]; then - usage - else - run "$@" - fi -else - [ -z "$TASK" ] || eval run "$TASK" -fi diff --git a/Utilities/Release/config_AIX b/Utilities/Release/config_AIX deleted file mode 100644 index 0ea8acc..0000000 --- a/Utilities/Release/config_AIX +++ /dev/null @@ -1,9 +0,0 @@ -PLATFORM="aix15" -CC="xlc" -CXX="xlC" - -# Write entries into the cache file before building cmake. -write_cache() -{ -write_standard_cache -} diff --git a/Utilities/Release/config_CYGWIN_NT-5.1 b/Utilities/Release/config_CYGWIN_NT-5.1 deleted file mode 100644 index aa2ebe9..0000000 --- a/Utilities/Release/config_CYGWIN_NT-5.1 +++ /dev/null @@ -1,3 +0,0 @@ -PLATFORM="cygwin" -CC="gcc" -CXX="g++" diff --git a/Utilities/Release/config_Darwin b/Utilities/Release/config_Darwin deleted file mode 100644 index 75f551c..0000000 --- a/Utilities/Release/config_Darwin +++ /dev/null @@ -1,13 +0,0 @@ -PLATFORM="darwin" -CC="cc" -CXX="c++" - -# Write entries into the cache file before building cmake. -write_cache() -{ -write_standard_cache - -cat >> CMakeCache.txt <> CMakeCache.txt <> CMakeCache.txt <> CMakeCache.txt <> CMakeCache.txt < UserMakeRules.cmake <> CMakeCache.txt <CMakeCache.txt <> ${INSTALL_DIR}${PREFIX}/share/doc/${PKG}-${VER}/MANIFEST </dev/null 2>&1 - /usr/bin/find . -name "*.exe" | xargs strip >/dev/null 2>&1 - true - ) -} - -clean() -{ - ( - cd ${BINARY_DIR} && - make clean - ) -} - -pkg() -{ - ( - cd ${INSTALL_DIR} && - tar cvjf "${BINARY_PACKAGE}" * - ) -} - -mkpatch() -{ - ( - cd ${SOURCE_DIR} && - tar xvjf "${SOURCE_TARBALL}" && - mv ${PKG}-${VER} ../${PKG}-${VER}-orig && - cd ${TOP_DIR} && - diff -urN -x '.build' -x '.inst' -x '.sinst' \ - "${PKG}-${VER}-orig" "${PKG}-${VER}" > "${SPKG_DIR}/${FULLPKG}.patch" ; - rm -rf "${TOP_DIR}/${PKG}-${VER}-orig" - ) -} - -spkg() -{ - ( - mkpatch && - cp ${SOURCE_TARBALL} ${SPKG_DIR} && - cp "$0" ${SPKG_DIR} && - cd ${SPKG_DIR} && - tar cvjf ${SOURCE_PACKAGE} * - ) -} - -finish() -{ - ( - rm -rf "${SOURCE_DIR}" - ) -} - -case $1 in - prep) prep ; STATUS=$? ;; - mkdirs) mkdirs ; STATUS=$? ;; - conf) conf ; STATUS=$? ;; - build) build ; STATUS=$? ;; - check) check ; STATUS=$? ;; - clean) clean ; STATUS=$? ;; - install) install ; STATUS=$? ;; - strip) strip ; STATUS=$? ;; - package) pkg ; STATUS=$? ;; - pkg) pkg ; STATUS=$? ;; - mkpatch) mkpatch ; STATUS=$? ;; - src-package) spkg ; STATUS=$? ;; - spkg) spkg ; STATUS=$? ;; - finish) finish ; STATUS=$? ;; - all) ( - prep && conf && build && install && strip && pkg && spkg && finish ; - STATUS=$? - ) ;; - *) echo "Error: bad arguments" ; exit 1 ;; -esac -exit ${STATUS} diff --git a/Utilities/Release/release_dispatch.sh b/Utilities/Release/release_dispatch.sh deleted file mode 100755 index 7f6da77..0000000 --- a/Utilities/Release/release_dispatch.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -MACHINES="" -MACHINES="${MACHINES} naboo" -MACHINES="${MACHINES} dashsun1" -MACHINES="${MACHINES} midworld" -MACHINES="${MACHINES} muse" -MACHINES="${MACHINES} destiny" - -run() -{ - CMD="'$1'"; shift; for i in "$@"; do CMD="${CMD} '$i'"; done - eval "$CMD" -} - -clean() -{ - for m in $MACHINES; do - ./cmake_release.sh remote $m clean - done -} - -binary() -{ - for m in $MACHINES; do - nohup ./cmake_release.sh remote_binary $m >$m.log 2>&1 & - done -} - -logs() -{ - for m in $MACHINES; do - nohup xterm -geometry 80x10 -title "$m" -e tail -f $m.log >/dev/null 2>&1 & - done -} - -[ ! -z "$1" ] && run "$@" -- cgit v0.12