3 # waf configure wrapper
5 # Fancy colors used to beautify the output a bit.
7 if [ "$NOCOLOR" ] ; then
28 #possible relative path
29 WORKINGDIR
=`dirname $0`
35 # Checks for Python interpreter. Honours $PYTHON if set. Stores path to
36 # interpreter in $PYTHON.
40 if [ -z "$PYTHON" ] ; then
41 PYTHON
=`which python 2>/dev/null`
43 printf "Checking for Python\t\t\t: "
44 if [ ! -x "$PYTHON" ] ; then
45 printf $RED"not found!"$NORMAL"\n"
46 echo "Please make sure that the Python interpreter is available in your PATH"
47 echo "or invoke configure using the PYTHON flag, e.g."
48 echo "$ PYTHON=/usr/local/bin/python configure"
51 printf $GREEN"$PYTHON"$NORMAL"\n"
54 # Checks for WAF. Honours $WAF if set. Stores path to 'waf' in $WAF.
55 # Requires that $PYTHON is set.
59 printf "Checking for WAF\t\t\t: "
60 #installed miniwaf in sourcedir
61 if [ -z "$WAF" ] ; then
62 if [ -f "${WORKINGDIR}/waf" ] ; then
63 WAF
="${WORKINGDIR}/waf"
64 if [ ! -x "$WAF" ] ; then
69 if [ -z "$WAF" ] ; then
70 if [ -f "${WORKINGDIR}/waf-light" ] ; then
71 ${WORKINGDIR}/waf-light
--make-waf
72 WAF
="${WORKINGDIR}/waf"
75 #global installed waf with waf->waf.py link
76 if [ -z "$WAF" ] ; then
77 WAF
=`which waf 2>/dev/null`
79 # neither waf nor miniwaf could be found
80 if [ ! -x "$WAF" ] ; then
81 printf $RED"not found"$NORMAL"\n"
82 echo "Go to http://code.google.com/p/waf/"
83 echo "and download a waf version"
86 printf $GREEN"$WAF"$NORMAL"\n"
90 # Generates a Makefile. Requires that $WAF is set.
96 # Waf Makefile wrapper
109 @if test -n "\$(DESTDIR)"; then \\
110 $WAF install --destdir="\$(DESTDIR)"; \\
116 @if test -n "\$(DESTDIR)"; then \\
117 $WAF uninstall --destdir="\$(DESTDIR)"; \\
142 echo "calling waf configure with parameters"
143 $WAF configure $
* ||
exit $EXIT_ERROR
145 if [ -f "Makefile" ] ; then