s4-waf: new autogen-waf.sh
[samba.git] / source4 / autogen-waf.sh
index 2e4869721cd9940b64cf6b65bc56009aba6240fd..9cb144afcf475025e8791c774a558503e3b2bc10 100755 (executable)
@@ -1,9 +1,22 @@
 #!/bin/sh
 
 echo "Setting up for waf build"
-ln -sf configure.waf configure
 
+echo "Looking for the buildtools directory"
+
+d="buildtools"
+while test \! -d $d; do d="../$d"; done
+
+echo "Found buildtools in $d"
+
+echo "Setting up configure"
+rm -f configure
+sed "s|BUILDTOOLS|$d|g" < "$d/scripts/configure.waf" > configure
+chmod +x configure
+
+echo "Setting up makefile"
 # this relies on the fact that make looks for 'makefile' before 'Makefile'
-ln -sf Makefile.waf makefile
+rm -f makefile
+sed "s|BUILDTOOLS|$d|g" < "$d/scripts/Makefile.waf" > makefile
 
-echo "done ... now run ./configure or ./configure.developer"
+echo "done. Now run ./configure or ./configure.developer then make"