3 # waf configure wrapper
5 # Fancy colors used to beautify the output a bit.
28 #possible relative path
29 WORKINGDIR
=$
(dirname $0)
33 TESTDIR
="$WORKINGDIR/t"
36 # We store waf under build/
37 PATH
=$WORKINGDIR/build
:$PATH
40 # Checks for Python interpreter. Honours $PYTHON if set. Stores path to
41 # interpreter in $PYTHON.
45 if [ -z "$PYTHON" ] ; then
46 PYTHON
=$
(which python
2>/dev
/null
)
48 printf "Checking for Python\t\t\t: "
49 if [ ! -x "$PYTHON" ] ; then
50 printf $RED"not found!"$NORMAL"\n"
51 echo "Please make sure that the Python interpreter is available in your PATH"
52 echo "or invoke configure using the PYTHON flag, e.g."
53 echo "$ PYTHON=/usr/local/bin/python configure"
56 printf $GREEN"$PYTHON"$NORMAL"\n"
59 # Checks for WAF. Honours $WAF if set. Stores path to 'waf' in $WAF.
60 # Requires that $PYTHON is set.
64 #installed miniwaf in sourcedir
65 if [ -z "$WAF" ] ; then
66 if [ -f "${WORKINGDIR}/build/waf" ] ; then
67 WAF
="${WORKINGDIR}/build/waf"
68 if [ ! -x $WAF ] ; then
73 #global installed waf with waf->waf.py link
75 WAF
=$
(which waf
2>/dev
/null
)
77 # neither waf nor miniwaf could be found
78 if [ ! -x "$WAF" ] ; then
79 printf $RED"not found"$NORMAL"\n"
80 echo "Goto http://www.freehackers.org/~tnagy/bksys.html"
81 echo "and download a waf version"
84 printf $GREEN"$WAF"$NORMAL"\n"
88 # Generates a Makefile. Requires that $WAF is set.
95 # Waf Makefile wrapper
96 # http://www.freehackers.org/~tnagy/waf.html
138 echo "calling waf configure with parameters"
139 $WAF configure $
* ||
exit $EXIT_ERROR
141 #create a Makefile if waf configure succeeds
142 if [ -f "${WORKINGDIR}/.lock-wscript" ] ; then
143 if [ -f "Makefile" ] ; then