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

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

Introducing gs-CMakeLists.txt as a GS customised CMakeLists.txt to replace the one in the xpdf tools src code package once the latter's been untarred. XPDFTools.sh takes care of doing the replacement after the untar operation. Minor cleanup to CMAKE.sh

  • Property svn:executable set to *
File size: 1.8 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# Only compile if necessary - we don't edit these source files:
34# Only compile up OUR cmake, and only if we haven't already got OUR cmake.
35# But don't use any system cmake: xpdf-tools is dependent on cmake version (>= 2.8.8)
36if [[ -x "$GEXTXPDFTOOLS_INSTALLED/linux/bin/cmake" ]]; then
37 echo "found cmake in $GEXTXPDFTOOLS_INSTALLED/linux/bin"
38 _CMAKE="$GEXTXPDFTOOLS_INSTALLED/linux/bin/cmake"
39fi
40
41if [[ "$_CMAKE" ]]; then
42 _VERSION=$("$_CMAKE" --version 2>&1 | sed 's/.*cmake version \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/;1q')
43 echo "cmake version $_VERSION"
44fi
45
46if [[ ! "$_CMAKE" ]]; then
47 opt_run_make $compile $package $version
48 opt_run_make $install $package $version "install"
49else
50 echo "$package$version already available => no need to recompile"
51fi
52
53opt_run_make $clean $package $version "clean"
54opt_run_make $distclean $package $version "distclean"
55
56opt_run_tarclean $tarclean $package $version
Note: See TracBrowser for help on using the repository browser.