2008-12-05 01:12:49 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
2008-12-05 20:59:21 +01:00
|
|
|
TEMP=`getopt -o "" --long prefix:,bindir:,datadir:,pydir:,root: \
|
2008-12-05 01:12:49 +01:00
|
|
|
-n 'configure' -- "$@"`
|
|
|
|
|
|
|
|
eval set -- "$TEMP"
|
|
|
|
|
|
|
|
while true ; do
|
|
|
|
case "$1" in
|
|
|
|
--prefix) PREFIX=$2 ; shift 2 ;;
|
|
|
|
--bindir) BINDIR=$2 ; shift 2 ;;
|
|
|
|
--datadir) DATADIR=$2 ; shift 2 ;;
|
|
|
|
--pydir) PYDIR=$2 ; shift 2 ;;
|
2008-12-05 20:59:21 +01:00
|
|
|
--root) ROOT=$2 ; shift 2 ;;
|
2008-12-05 01:12:49 +01:00
|
|
|
--) shift ; break ;;
|
|
|
|
*) echo "Internal error!" ; exit 1 ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2008-12-05 20:59:21 +01:00
|
|
|
#if [[ $PREFIX == "" ]] ; then PREFIX=/usr/local ; fi
|
2008-12-05 01:12:49 +01:00
|
|
|
if [[ $BINDIR == "" ]] ; then BINDIR=$PREFIX/bin ; fi
|
|
|
|
if [[ $DATADIR == "" ]] ; then DATADIR=$PREFIX/share/laydi ; fi
|
|
|
|
if [[ $DOCDIR == "" ]] ; then DOCDIR=$PREFIX/share/doc/laydi; fi
|
|
|
|
if [[ $PYDIR == "" ]] ; then PYDIR=$PREFIX/share/python-support/laydi; fi
|
|
|
|
|
2008-12-05 20:59:21 +01:00
|
|
|
m4 -D M4_PREFIX=$ROOT/$PREFIX -D M4_BINDIR=$ROOT/$BINDIR \
|
|
|
|
-D M4_DATADIR=$ROOT/$DATADIR -D M4_DOCDIR=$ROOT/$DOCDIR \
|
|
|
|
-D M4_PYDIR=$ROOT/$PYDIR Makefile.m4 > Makefile
|
2008-12-05 01:12:49 +01:00
|
|
|
|
2008-12-05 20:59:21 +01:00
|
|
|
m4 -D M4_PREFIX=$ROOT/$PREFIX -D M4_BINDIR=$ROOT/$BINDIR \
|
|
|
|
-D M4_DATADIR=$ROOT/$DATADIR -D M4_DOCDIR=$ROOT/$DOCDIR \
|
|
|
|
-D M4_PYDIR=$ROOT/$PYDIR doc/Makefile.m4 > doc/Makefile
|
2008-12-05 01:12:49 +01:00
|
|
|
|
|
|
|
m4 -D M4_PREFIX=$PREFIX -D M4_BINDIR=$BINDIR \
|
|
|
|
-D M4_DATADIR=$DATADIR -D M4_DOCDIR=$DOCDIR \
|
2008-12-05 23:07:56 +01:00
|
|
|
-D M4_PYDIR=$PYDIR laydi/paths.py.m4 > laydi/paths.py
|
2008-12-05 01:12:49 +01:00
|
|
|
|