s4-waf: new autogen-waf.sh
authorAndrew Tridgell <tridge@samba.org>
Sun, 4 Apr 2010 08:27:30 +0000 (18:27 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:27:25 +0000 (20:27 +1000)
this one will work with the tdb, talloc, etc directories

buildtools/scripts/Makefile.waf [moved from source4/Makefile.waf with 72% similarity]
buildtools/scripts/configure.waf [new file with mode: 0755]
source4/autogen-waf.sh
source4/configure.waf [deleted file]

similarity index 72%
rename from source4/Makefile.waf
rename to buildtools/scripts/Makefile.waf
index 1e950ed18c98178bf87b89df043607c7a68b791c..e17ae217df57dc707c023acde1a279c74ee5b995 100644 (file)
@@ -1,16 +1,11 @@
 # simple makefile wrapper to run waf
 
-# don't enable WAFCACHE by default yet, as it doesn't
-# have any way to limit its size. This could cause
-# problems in the build farm
-# WAF=WAFCACHE=$(HOME)/.wafcache ../buildtools/waf
-
 # default to using only 1 cpu, to be friendly to build
 # farm machines. I wonder how we get at the -jN option
 # from make to pass it to waf?
 JOBS=1
 
-WAF=JOBS=$(JOBS) ../buildtools/bin/waf
+WAF=JOBS=$(JOBS) BUILDTOOLS/bin/waf
 
 all:
        $(WAF) build
diff --git a/buildtools/scripts/configure.waf b/buildtools/scripts/configure.waf
new file mode 100755 (executable)
index 0000000..a6367e7
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+
+WAF=BUILDTOOLS/bin/waf
+
+# using JOBS=1 gives maximum compatibility with
+# systems like AIX which have broken threading in python
+JOBS=1
+export JOBS
+
+$WAF configure $*
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"
diff --git a/source4/configure.waf b/source4/configure.waf
deleted file mode 100755 (executable)
index 128ac93..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-echo "Using waf based build"
-
-WAF=../buildtools/bin/waf
-
-# using JOBS=1 gives maximum compatibility with
-# systems like AIX which have broken threading in python
-JOBS=1
-export JOBS
-
-# don't enable WAFCACHE by default till it is
-# size limited
-#export WAFCACHE=$HOME/.wafcache
-#mkdir -p $WAFCACHE
-
-$WAF configure $*