3 # waf configure wrapper
5 # Fancy colors used to beautify the output a bit.
28 # Get the absolute path
31 # We store waf under build/
32 PATH
="$WORKINGDIR"/build
:"$PATH"
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 #installed miniwaf in sourcedir
60 if test -z "$WAF"; then
61 if test -f "$WORKINGDIR"/build
/waf
; then
62 WAF
="$WORKINGDIR"/build
/waf
65 #global installed waf with waf->waf.py link
66 if test -z "$WAF"; then
67 WAF
=$
(which waf
2>/dev
/null
)
69 # neither waf nor miniwaf could be found
70 if [ ! -x "$WAF" ] ; then
71 printf $RED"not found"$NORMAL"\n"
72 echo "Goto http://code.google.com/p/waf/"
73 echo "and download a waf version"
76 printf $GREEN"$WAF"$NORMAL"\n"
78 # Simplify the Makefile
80 if [ "$WAFPATH" = "$WORKINGDIR"/build
/waf
]; then
81 WAFPATH
="\$(CURDIR)/build/waf"
85 # Generates a Makefile. Requires that $WAFPATH is set.
92 # Waf Makefile wrapper
93 # http://code.google.com/p/waf/
98 @\$(PYTHON) \$(WAF) build
101 @\$(PYTHON) \$(WAF) -v build
104 @\$(PYTHON) \$(WAF) -p build
107 @\$(PYTHON) \$(WAF) install
110 @\$(PYTHON) \$(WAF) uninstall
113 @\$(PYTHON) \$(WAF) clean
116 @\$(PYTHON) \$(WAF) distclean
122 @\$(PYTHON) \$(WAF) check
125 @\$(PYTHON) \$(WAF) dist
128 @\$(CURDIR)/t/run_tests
136 echo "calling waf configure with parameters"
137 $WAF configure $
* ||
exit $EXIT_ERROR
139 #create a Makefile if waf configure succeeds
140 if test -f "$WORKINGDIR"/.lock-wscript
; then