s4-waf: allow standalone tarball build of libraries
authorAndrew Tridgell <tridge@samba.org>
Sun, 4 Apr 2010 00:18:39 +0000 (10:18 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:27:25 +0000 (20:27 +1000)
lib/talloc/wscript
lib/tdb/wscript
lib/tevent/wscript
source4/lib/ldb/wscript

index f264513916960acab1a23b0e4722344384dd763b..a7476b7ec40182ce54244c54fdba01d698d047ba 100644 (file)
@@ -3,9 +3,17 @@
 APPNAME = 'talloc'
 VERSION = '2.0.2'
 
-srcdir = '../..'
 blddir = 'bin'
 
+# find the buildtools directory
+import os
+buildtools = 'buildtools ../../buildtools'
+for d in buildtools.split():
+    if os.path.exists(d):
+        srcdir = os.path.dirname(d) or '.'
+        break
+
+
 LIBREPLACE_DIR= srcdir + '/lib/replace'
 
 import sys
index 87bdcdf79df7e9760d90914a0981c9b26f6d82dc..c4b59e3a8f546d115bf4d7eb6202a289c2a5a519 100644 (file)
@@ -3,10 +3,17 @@
 APPNAME = 'tdb'
 VERSION = '1.2.1'
 
-srcdir = '../..'
 blddir = 'bin'
 
-import sys
+import sys, os
+
+# find the buildtools directory
+buildtools = 'buildtools ../../buildtools'
+for d in buildtools.split():
+    if os.path.exists(d):
+        srcdir = os.path.dirname(d) or '.'
+        break
+
 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
 import wafsamba
 
index 1298eb458802d19d6ef7c552455ccfc838355364..41ca66ad1556b6b04e8dd293f5d116d60c86bde5 100644 (file)
@@ -3,10 +3,17 @@
 APPNAME = 'tevent'
 VERSION = '0.9.8'
 
-srcdir = '../..'
 blddir = 'bin'
 
-import sys
+import sys, os
+
+# find the buildtools directory
+buildtools = 'buildtools ../../buildtools'
+for d in buildtools.split():
+    if os.path.exists(d):
+        srcdir = os.path.dirname(d) or '.'
+        break
+
 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
 import wafsamba
 
index 311672fe2848cd9d7f0f3a4aa89b856ed576cf39..ddd5e138c45406748eb4f844cf9b59be64ee49ea 100644 (file)
@@ -3,10 +3,16 @@
 APPNAME = 'ldb'
 VERSION = '0.9.10'
 
-srcdir = '../../..'
 blddir = 'bin'
 
-import sys
+import sys, os
+# find the buildtools directory
+buildtools = 'buildtools ../../buildtools'
+for d in buildtools.split():
+    if os.path.exists(d):
+        srcdir = os.path.dirname(d) or '.'
+        break
+
 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
 import wafsamba