summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-08-28 19:08:18 (GMT)
committerBrad King <brad.king@kitware.com>2002-08-28 19:08:18 (GMT)
commit1168d5a85d2e9bf4b74926b1790ded87fd4d5072 (patch)
tree8236fb0d47a39cfb5a38e18d9fadfa5ded9f531a /Utilities
parentd0be2896d7191e56818aaac48f7177b9d92a9693 (diff)
downloadCMake-1168d5a85d2e9bf4b74926b1790ded87fd4d5072.zip
CMake-1168d5a85d2e9bf4b74926b1790ded87fd4d5072.tar.gz
CMake-1168d5a85d2e9bf4b74926b1790ded87fd4d5072.tar.bz2
ENH: Moved build of source tarball to package script.
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmake_release_config_cygwin6
-rwxr-xr-xUtilities/cmake_release_unix_build.sh19
-rwxr-xr-xUtilities/cmake_release_unix_config.sh4
-rwxr-xr-xUtilities/cmake_release_unix_package.sh26
4 files changed, 29 insertions, 26 deletions
diff --git a/Utilities/cmake_release_config_cygwin b/Utilities/cmake_release_config_cygwin
index 2958bdb..93ff68c 100644
--- a/Utilities/cmake_release_config_cygwin
+++ b/Utilities/cmake_release_config_cygwin
@@ -4,6 +4,8 @@ VERSION="1.4-4"
PLATFORM="x86-cygwin"
DOC_DIR="/doc/cmake-${VERSION}"
FIND="/usr/bin/find"
+CREATE_SOURCE_TARBALL="yes"
+SOURCE_TARBALL_NAME="cmake-$VERSION"
CreateExtraFiles()
{
@@ -19,10 +21,10 @@ CreatePackage()
{
echo "Creating cmake-$VERSION-$PLATFORM.tar"
cd ${INSTALL_DIR}
-if ${TAR} cvf ${TARBALL_DIR}/cmake-$VERSION-$PLATFORM.tar ${PREFIX} \
+if ${TAR} cvf ${TARBALL_DIR}/cmake-$VERSION-$PLATFORM.tar .${PREFIX} \
> ${LOG_DIR}/cmake-$VERSION-$PLATFORM-cygwin.log 2>&1 ; then : ; else
echo "Error, see ${LOG_DIR}/cmake-$VERSION-$PLATFORM-cygwin.log"
exit 1
fi
bzip2 ${TARBALL_DIR}/cmake-$VERSION-$PLATFORM.tar
-} \ No newline at end of file
+}
diff --git a/Utilities/cmake_release_unix_build.sh b/Utilities/cmake_release_unix_build.sh
index cd9f319..a6c85ac 100755
--- a/Utilities/cmake_release_unix_build.sh
+++ b/Utilities/cmake_release_unix_build.sh
@@ -29,25 +29,6 @@ if test ! -d ${SOURCE_DIR} ; then
mv CMake CMake-$VERSION
fi
-# Make the source tarball if requested.
-if test "${CREATE_SOURCE_TARBALL}" = "yes" ; then
- TARBALL="${TARBALL_DIR}/CMake$VERSION-src-unix.tar"
- echo "Creating CMake$VERSION-src-unix.tar"
- if ${TAR} cvf $TARBALL CMake-$VERSION \
- > ${LOG_DIR}/CMake$VERSION-src-unix.log 2>&1 ; then : ; else
- "Error, see ${LOG_DIR}/CMake$VERSION-src-unix.log"
- exit 1
- fi
- if test "x${GZIP}" != "x" ; then
- echo "Creating $TARBALL.gz"
- ${GZIP} -c $TARBALL > $TARBALL.gz
- fi
- if test "x${COMPRESS}" != "x" ; then
- echo "Creating $TARBALL.Z"
- ${COMPRESS} $TARBALL
- fi
-fi
-
# Build the release.
cd ${BUILD_DIR}
echo "Writing CMakeCache.txt..."
diff --git a/Utilities/cmake_release_unix_config.sh b/Utilities/cmake_release_unix_config.sh
index 2f63332..1f8cefb 100755
--- a/Utilities/cmake_release_unix_config.sh
+++ b/Utilities/cmake_release_unix_config.sh
@@ -83,3 +83,7 @@ SOURCE_DIR="${RELEASE_ROOT}/CMake-$VERSION"
BUILD_DIR="${RELEASE_ROOT}/CMake-$VERSION-$PLATFORM-build"
LOG_DIR="${RELEASE_ROOT}/Logs"
INSTALL_OPTIONS="DESTDIR=\"${INSTALL_DIR}\""
+
+if [ -z "$SOURCE_TARBALL_NAME" ]; then
+ SOURCE_TARBALL_NAME="CMake$VERSION-src-unix"
+fi
diff --git a/Utilities/cmake_release_unix_package.sh b/Utilities/cmake_release_unix_package.sh
index 3fa7e53..832cc3c 100755
--- a/Utilities/cmake_release_unix_package.sh
+++ b/Utilities/cmake_release_unix_package.sh
@@ -12,8 +12,8 @@ SELFPATH=`cd \`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd`
. ${SELFPATH}/cmake_release_unix_config.sh
# Cleanup from possible previous run.
-rm -rf ${INSTALL_DIR}
-mkdir -p ${INSTALL_DIR}
+rm -rf ${INSTALL_DIR} ${TARBALL_DIR}
+mkdir -p ${INSTALL_DIR} ${TARBALL_DIR}
# Run the installation.
cd ${BUILD_DIR}
@@ -31,6 +31,25 @@ if ${STRIP} ${INSTALL_DIR}${PREFIX}/bin/* \
exit 1
fi
+# Make the source tarball if requested.
+if test "${CREATE_SOURCE_TARBALL}" = "yes" ; then
+ TARBALL="${TARBALL_DIR}/${SOURCE_TARBALL_NAME}.tar"
+ echo "Creating ${SOURCE_TARBALL_NAME}.tar"
+ if ${TAR} cvf $TARBALL CMake-$VERSION \
+ > ${LOG_DIR}/${SOURCE_TARBALL_NAME}.log 2>&1 ; then : ; else
+ echo "Error, see ${LOG_DIR}/${SOURCE_TARBALL_NAME}.log"
+ exit 1
+ fi
+ if test "x${GZIP}" != "x" ; then
+ echo "Creating $TARBALL.gz"
+ ${GZIP} -c $TARBALL > $TARBALL.gz
+ fi
+ if test "x${COMPRESS}" != "x" ; then
+ echo "Creating $TARBALL.Z"
+ ${COMPRESS} $TARBALL
+ fi
+fi
+
# Let the configuration file add some files.
CreateExtraFiles
@@ -70,7 +89,6 @@ ${FILES}
EOF
TARBALL="${TARBALL_DIR}/CMake$VERSION-$PLATFORM.tar"
-[ -e $TARBALL ] && rm -rf $TARBALL
echo "Creating CMake$VERSION-$PLATFORM.tar"
if ${TAR} cvf $TARBALL README ${INTERNAL_NAME}.tar \
> ${LOG_DIR}/CMake$VERSION-$PLATFORM.log 2>&1 ; then : ; else
@@ -80,12 +98,10 @@ fi
if test "x${GZIP}" != "x" ; then
echo "Creating $TARBALL.gz"
- [ -e $TARBALL.gz ] && rm -rf $TARBALL.gz
${GZIP} -c $TARBALL > $TARBALL.gz
fi
if test "x${COMPRESS}" != "x" ; then
echo "Creating $TARBALL.Z"
- [ -e $TARBALL.Z ] && rm -rf $TARBALL.Z
${COMPRESS} $TARBALL
fi