From 1e35da61455ac1e94b1f64f661e7052113de4dfc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 4 Apr 2010 18:27:30 +1000 Subject: s4-waf: new autogen-waf.sh this one will work with the tdb, talloc, etc directories --- buildtools/scripts/Makefile.waf | 48 ++++++++++++++++++++++++++++++++++++ buildtools/scripts/configure.waf | 11 +++++++++ source4/Makefile.waf | 53 ---------------------------------------- source4/autogen-waf.sh | 19 +++++++++++--- source4/configure.waf | 17 ------------- 5 files changed, 75 insertions(+), 73 deletions(-) create mode 100644 buildtools/scripts/Makefile.waf create mode 100755 buildtools/scripts/configure.waf delete mode 100644 source4/Makefile.waf delete mode 100755 source4/configure.waf diff --git a/buildtools/scripts/Makefile.waf b/buildtools/scripts/Makefile.waf new file mode 100644 index 0000000000..e17ae217df --- /dev/null +++ b/buildtools/scripts/Makefile.waf @@ -0,0 +1,48 @@ +# simple makefile wrapper to run 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 + +all: + $(WAF) build + +install: + $(WAF) install + +uninstall: + $(WAF) uninstall + +test: + $(WAF) test + +quicktest: + $(WAF) test --quick + +clean: + $(WAF) clean + +distclean: clean + rm -rf bin + +# some compatibility make targets +everything: all + +testsuite: all + +check: test + +torture: all + +# this should do an install as well, once install is finished +installcheck: test + +etags: + $(WAF) etags + +ctags: + $(WAF) ctags + diff --git a/buildtools/scripts/configure.waf b/buildtools/scripts/configure.waf new file mode 100755 index 0000000000..a6367e7314 --- /dev/null +++ b/buildtools/scripts/configure.waf @@ -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 $* diff --git a/source4/Makefile.waf b/source4/Makefile.waf deleted file mode 100644 index 1e950ed18c..0000000000 --- a/source4/Makefile.waf +++ /dev/null @@ -1,53 +0,0 @@ -# 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 - -all: - $(WAF) build - -install: - $(WAF) install - -uninstall: - $(WAF) uninstall - -test: - $(WAF) test - -quicktest: - $(WAF) test --quick - -clean: - $(WAF) clean - -distclean: clean - rm -rf bin - -# some compatibility make targets -everything: all - -testsuite: all - -check: test - -torture: all - -# this should do an install as well, once install is finished -installcheck: test - -etags: - $(WAF) etags - -ctags: - $(WAF) ctags - diff --git a/source4/autogen-waf.sh b/source4/autogen-waf.sh index 2e4869721c..9cb144afcf 100755 --- a/source4/autogen-waf.sh +++ b/source4/autogen-waf.sh @@ -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 index 128ac93057..0000000000 --- a/source4/configure.waf +++ /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 $* -- cgit