einarr
04b7cbb872
still allowing workflows to be placed in several locations in the file system. The installation procedure is now ./configure && make install configure will run m4 on fluents/paths.py.m4, Makefile.m4 and doc/Makefile.m4 so that the installation system and the program will know where some important directories are located. The paths.py.m4 and consequently also pahts.py files are just listings of directories configured during install. I did this to separate these from all other files so that as little as possible is touched by m4. It is still necessary to do an install now to get the program to run in a clean checkout. Workflows can now be placed anywhere in the system. This is done by setting the workflowdir variable in the configuration file. All workflow directories, separated by semicolons, are added to the python path. The use of setup.py is now deprecated.
38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
|
|
TEMP=`getopt -o "" --long prefix:,bindir:,datadir:,pydir: \
|
|
-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 ;;
|
|
--) 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/python-support/laydi; fi
|
|
|
|
m4 -D M4_PREFIX=$PREFIX -D M4_BINDIR=$BINDIR \
|
|
-D M4_DATADIR=$DATADIR -D M4_DOCDIR=$DOCDIR \
|
|
-D M4_PYDIR=$PYDIR Makefile.m4 > Makefile
|
|
|
|
m4 -D M4_PREFIX=$PREFIX -D M4_BINDIR=$BINDIR \
|
|
-D M4_DATADIR=$DATADIR -D M4_DOCDIR=$DOCDIR \
|
|
-D M4_PYDIR=$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 fluents/paths.py.m4 > fluents/paths.py
|
|
|