summaryrefslogtreecommitdiffstats
path: root/Utilities/cmake_release_unix_config.sh
blob: 1f8cefbd4012470f286f96c85fa27697a75d9d77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/sh
#
# CMake UNIX Release Configuration Script.
#
# This is sourced by the cmake_release_unix_build and
# cmake_release_unix_package to setup the configuration.
#

# Check the command line arguments.
CONFIG_FILE=$1
if test "x$1" = "x"; then
  echo "Usage:"
  echo "  $0 <configuration-file>"
  echo ""
  echo "Sample configuration file:"
  echo "  RELEASE_TAG=\"Release-1-4\""
  echo "  VERSION=\"1.4\""
  echo "  PLATFORM=\"x86-linux\""
  exit 1
fi

# Set some defaults here.  They can be changed by the configuration
# file.
CVSROOT=":pserver:anonymous@www.cmake.org:/cvsroot/CMake"
CAT="cat"
COMPRESS="compress"
CREATE_SOURCE_TARBALL="no"
CVS="cvs"
FIND="find"
GZIP="gzip"
MAKE="make"
MKDIR="mkdir"
RELEASE_ROOT=`pwd`
STRIP="strip"
TAR="tar"
TOUCH="touch"
CC="gcc"
CXX="c++"
CFLAGS=""
CXXFLAGS=""
PREFIX="/usr/local"
INSTALL_SUBDIRS="bin share doc"
DOC_DIR="/doc/cmake"
# Functions can be replaced by configuration file.

# Create extra files in the installation tree.  This allows
# configurations to add documentation.
CreateExtraFiles()
{
  return 0
}

# Create a package file.  This allows configurations to create
# packages for certain UNIX distributions.
CreatePackage()
{
  return 0
}

# Write entries into the cache file before building cmake.
WriteCMakeCache()
{
${CAT} > CMakeCache.txt <<EOF
BUILD_TESTING:BOOL=OFF
EOF
}

#-----------------------------------------------------------------------------
# Configuration options.
echo "Reading configuration from ${CONFIG_FILE}..."
if . ${CONFIG_FILE} ; then : ; else
  echo "Error reading configuration."
  exit 1
fi
#-----------------------------------------------------------------------------

export CC CXX CFLAGS CXXFLAGS

# Select directories.
INSTALL_DIR="${RELEASE_ROOT}/Install"
TARBALL_DIR="${RELEASE_ROOT}/Tarballs"
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