File: configure

package info (click to toggle)
gap-guava 3.19%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,864 kB
  • sloc: ansic: 20,499; xml: 10,533; makefile: 254; sh: 55
file content (40 lines) | stat: -rwxr-xr-x 1,159 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
# usage: configure gappath
# this script creates a `Makefile' from `Makefile.in'

set -e

GAPPATH=../..
while test "$#" -ge 1 ; do
  option="$1" ; shift
  case "$option" in
    --with-gaproot=*) GAPPATH=${option#--with-gaproot=}; ;;
    -*)               echo "ERROR: unsupported argument $option" ; exit 1;;
    *)                GAPPATH="$option" ;;
  esac
done

if test ! -r "$GAPPATH/sysinfo.gap" ; then
    echo
    echo "No file $GAPPATH/sysinfo.gap found."
    echo
    echo "Usage: ./configure [GAPPATH]"
    echo "       where GAPPATH is a path to your GAP installation"
    echo "       (The default for GAPPATH is \"../..\")"
    echo
    echo "Either your GAPPATH is incorrect or the GAP it is pointing to"
    echo "is not properly compiled (do \"./configure && make\" there first)."
    echo
    echo "Aborting... No Makefile is generated."
    echo
    exit 1
fi

echo "Using settings from $GAPPATH/sysinfo.gap"
rm -f Makefile
. "$GAPPATH/sysinfo.gap"
sed \
    -e 's;@DEB_BUILD_MULTIARCH@;'$(dpkg-architecture -qDEB_BUILD_MULTIARCH)';g' \
    -e "s;@GAPARCH@;$GAParch;g" \
    -e "s;@GAPPATH@;$GAPPATH;g" \
    Makefile.in >Makefile