Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0
This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
laydi/configure

39 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

#!/bin/bash
TEMP=`getopt -o "" --long prefix:,bindir:,datadir:,pydir:,root: \
-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 ;;
--root) ROOT=$2 ; shift 2 ;;
--) shift ; break ;;
*) echo "Internal error!" ; exit 1 ;;
esac
done
#if [[ $PREFIX == "" ]] ; then PREFIX=/usr/local ; fi
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/pyshared/laydi; fi
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
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
m4 -D M4_PREFIX=$PREFIX -D M4_BINDIR=$BINDIR \
-D M4_DATADIR=$DATADIR -D M4_DOCDIR=$DOCDIR \
-D M4_PYDIR=$PYDIR laydi/paths.py.m4 > laydi/paths.py