source: gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/CMAKE.sh@ 32240

Last change on this file since 32240 was 32240, checked in by ak19, 6 years ago

Forgot to cleanup a couple of things before the previous commit

  • Property svn:executable set to *
File size: 2.2 KB
Line 
1#!/bin/bash
2
3package=cmake
4version=-3.11.4
5
6progname=$0
7
8source ../cascade-make/lib/cascade-lib.bash GEXT_XPDFTOOLS ../.. $*
9
10prefix=$GEXTXPDFTOOLS_INSTALLED
11
12opt_run_untar $force_untar $auto_untar $package $version
13
14# For configuring cmake, run ./bootstrap <args> instead of ./configure <args>
15# See https://cmake.org/install/
16#opt_run_configure $force_config $auto_config $package $version $prefix
17if [ $force_config = "1" ] ; then
18 echo "[pushd $package$version]"
19 ( cd $package$version ; \
20 echo $CROSSCONFIGURE_VARS ./bootstrap --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ;
21 eval $CROSSCONFIGURE_VARS ./bootstrap --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ )
22 if [ $? != 0 ] ; then
23 echo " Error encountered running *bootstrap* stage of $progname"
24 exit 1
25 fi
26 echo "[popd]"
27else
28 if [ $auto_config = "1" ] ; then
29 echo "Found top-level for ${progname%.*} => no need to run ./bootstrap"
30 fi
31fi
32
33# Check that CMake products weren't just moved out of the distribution area,
34# before recompiling all of CMake
35if [[ ! -e "$GEXTXPDFTOOLS_INSTALLED/bin/cmake" && -e "$GEXT_XPDFTOOLS/devel/$GSDLOS/bin/cmake" ]]; then
36 echo "**************************************"
37 echo "Moving intermediary CMake products back for development"
38 $GEXT_XPDFTOOLS/move-cmake.sh back
39 echo "**************************************"
40fi
41
42# Only compile if necessary - we don't edit these source files:
43# Only compile up OUR cmake, and only if we haven't already got OUR cmake.
44# But don't use any system cmake: xpdf-tools is dependent on cmake version (>= 2.8.8)
45if [[ -x "$GEXTXPDFTOOLS_INSTALLED/bin/cmake" ]]; then
46 echo "found cmake in $GEXTXPDFTOOLS_INSTALLED/bin"
47 _CMAKE="$GEXTXPDFTOOLS_INSTALLED/bin/cmake"
48fi
49
50if [[ "$_CMAKE" ]]; then
51 _VERSION=$("$_CMAKE" --version 2>&1 | sed 's/.*cmake version \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/;1q')
52 echo "cmake version $_VERSION"
53fi
54
55if [[ ! "$_CMAKE" ]]; then
56 opt_run_make $compile $package $version
57 opt_run_make $install $package $version "install"
58else
59 echo "$package$version already available => no need to recompile"
60fi
61
62opt_run_make $clean $package $version "clean"
63opt_run_make $distclean $package $version "distclean"
64
65opt_run_tarclean $tarclean $package $version
Note: See TracBrowser for help on using the repository browser.