ctdb-build: Add build files (configure/Makefile) to use waf
authorAmitay Isaacs <amitay@gmail.com>
Thu, 15 May 2014 14:10:00 +0000 (00:10 +1000)
committerMichael Adam <obnox@samba.org>
Fri, 20 Jun 2014 21:38:10 +0000 (23:38 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/Makefile [new file with mode: 0644]
ctdb/configure [new file with mode: 0755]

diff --git a/ctdb/Makefile b/ctdb/Makefile
new file mode 100644 (file)
index 0000000..44fd756
--- /dev/null
@@ -0,0 +1,69 @@
+# simple makefile wrapper to run waf
+
+WAF=WAF_MAKE=1 PATH=../buildtools/bin:$$PATH waf
+
+all:
+       $(WAF) build
+
+install:
+       $(WAF) install
+
+uninstall:
+       $(WAF) uninstall
+
+test: FORCE
+       $(WAF) test $(TEST_OPTIONS)
+
+testenv:
+       $(WAF) test --testenv $(TEST_OPTIONS)
+
+autotest:
+       $(WAF) autotest $(TEST_OPTIONS)
+
+quicktest:
+       $(WAF) test --quick $(TEST_OPTIONS)
+
+dist:
+       touch .tmplock
+       WAFLOCK=.tmplock $(WAF) dist
+
+distcheck:
+       touch .tmplock
+       WAFLOCK=.tmplock $(WAF) distcheck
+
+clean:
+       $(WAF) clean
+
+distclean:
+       $(WAF) distclean
+
+reconfigure: configure
+       $(WAF) reconfigure
+
+show_waf_options:
+       $(WAF) --help
+
+# 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
+
+pydoctor:
+       $(WAF) pydoctor
+
+bin/%:: FORCE
+       $(WAF) --targets=`basename $@`
+FORCE:
diff --git a/ctdb/configure b/ctdb/configure
new file mode 100755 (executable)
index 0000000..5357de4
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+PREVPATH=`dirname $0`
+
+WAF=../buildtools/bin/waf
+
+# using JOBS=1 gives maximum compatibility with
+# systems like AIX which have broken threading in python
+JOBS=1
+export JOBS
+
+cd . || exit 1
+${PYTHON:=python} $WAF configure "$@" || exit 1
+cd $PREVPATH