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`
36 # Checks for WAF. Honours $WAF if set. Stores path to 'waf' in $WAF.
37 # Requires that $PYTHON is set.
41 printf "Checking for WAF\t\t\t: "
42 #installed miniwaf in sourcedir
43 if [ -z "$WAF" ] ; then
44 if [ -f "${WORKINGDIR}/waf" ] ; then
45 WAF="${WORKINGDIR}/waf"
46 if [ ! -x "$WAF" ] ; then
51 if [ -z "$WAF" ] ; then
52 if [ -f "${WORKINGDIR}/waf-light" ] ; then
53 ${WORKINGDIR}/waf-light --make-waf
54 WAF="${WORKINGDIR}/waf"
57 #global installed waf with waf->waf.py link
58 if [ -z "$WAF" ] ; then
59 WAF=`which waf 2>/dev/null`
61 # neither waf nor miniwaf could be found
62 if [ ! -x "$WAF" ] ; then
63 printf "$RED""not found""$NORMAL""\n"
64 echo "Go to http://code.google.com/p/waf/"
65 echo "and download a waf version"
68 printf "$GREEN""$WAF""$NORMAL""\n"
72 # Generates a Makefile. Requires that $WAF is set.
78 # Waf Makefile wrapper
110 .PHONY: clean dist distclean check uninstall install all
118 "${WAF}" configure $*