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
|
#!/bin/sh
# (C) Frank Lübeck 2011
# configure script for Browse, EDIM and other packages
# usage: ./configure [GAPPATH]
# this script creates a "Makefile-myconf" from "Makefile.in" with
# a link to "Makefile"
# GAP path
if [ $# = 0 ]; then
GAPPATH="../../"
else
GAPPATH=$1
fi
echo "Using $GAPPATH as GAP build directory."
if [ ! -e $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 " and confnam is the name of the GAP configuration to use."
echo " (The default for GAPPATH is \"../..\" and default confignam"
echo " is \"default64\" if it exists, otherwise \"default32\".)"
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 config in $GAPPATH/sysinfo.gap"
rm -f Makefile
. $GAPPATH/sysinfo.gap
sed \
-e 's/@DEB_BUILD_MULTIARCH@/'$(dpkg-architecture -qDEB_BUILD_MULTIARCH)'/g' \
-e 's|@GAPPATH@|'$GAPPATH'|g' \
-e 's/@GAPARCH@/'$GAParch'/g' \
Makefile.in > Makefile
|