3 # waf configure wrapper
5 # Fancy colors used to beautify the output a bit.
28 #possible relative path
29 WORKINGDIR
=`dirname $0`
35 # We store waf under buildutils/
36 PATH
=$WORKINGDIR/buildutils
:$PATH
39 # Checks for Python interpreter. Honours $PYTHON if set. Stores path to
40 # interpreter in $PYTHON.
44 if [ -z "$PYTHON" ] ; then
45 PYTHON
=`which python 2>/dev/null`
47 printf "Checking for Python\t\t\t: "
48 if [ ! -x "$PYTHON" ] ; then
49 printf $RED"not found!"$NORMAL"\n"
50 echo "Please make sure that the Python interpreter is available in your PATH"
51 echo "or invoke configure using the PYTHON flag, e.g."
52 echo "$ PYTHON=/usr/local/bin/python configure"
55 printf $GREEN"$PYTHON"$NORMAL"\n"
58 # Checks for WAF. Honours $WAF if set. Stores path to 'waf' in $WAF.
59 # Requires that $PYTHON is set.
63 #installed miniwaf in sourcedir
64 if [ -z "$WAF" ] ; then
65 if [ -f "${WORKINGDIR}/buildutils/waf" ] ; then
66 WAF
="${WORKINGDIR}/buildutils/waf"
67 if [ ! -x $WAF ] ; then
72 #global installed waf with waf->waf.py link
74 WAF
=`which waf 2>/dev/null`
76 # neither waf nor miniwaf could be found
77 if [ ! -x "$WAF" ] ; then
78 printf $RED"not found"$NORMAL"\n"
79 echo "Goto http://www.freehackers.org/~tnagy/bksys.html"
80 echo "and download a waf version"
83 printf $GREEN"$WAF"$NORMAL"\n"
87 # Generates a Makefile. Requires that $WAF is set.
94 # Waf Makefile wrapper
95 # http://www.freehackers.org/~tnagy/waf.html
134 echo "calling waf configure with parameters"
135 $WAF configure $
* ||
exit $EXIT_ERROR
137 #create a Makefile if waf configure succeeds
138 if [ -f "${WORKINGDIR}/.lock-wscript" ] ; then
139 if [ -f "Makefile" ] ; then