waf: Only build the wrappers if we enable selftest
authorAndreas Schneider <asn@samba.org>
Mon, 23 Feb 2015 16:12:46 +0000 (17:12 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 23 Feb 2015 21:31:22 +0000 (22:31 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Feb 23 22:31:22 CET 2015 on sn-devel-104

wscript
wscript_build

diff --git a/wscript b/wscript
index d5a4ccb7bac93a03bc5f538ddd251d8da1ca2e08..2644cbc132856923aadc3e14b6bca5dfec30744b 100644 (file)
--- a/wscript
+++ b/wscript
@@ -156,16 +156,17 @@ def configure(conf):
     conf.RECURSE('lib/ntdb')
     conf.RECURSE('lib/util/charset')
     conf.RECURSE('source4/auth')
-    conf.RECURSE('lib/nss_wrapper')
     conf.RECURSE('nsswitch')
-    conf.RECURSE('lib/resolv_wrapper')
-    conf.RECURSE('lib/socket_wrapper')
-    conf.RECURSE('lib/uid_wrapper')
     conf.RECURSE('lib/subunit/c')
     conf.RECURSE('libcli/smbreadline')
     conf.RECURSE('lib/crypto')
     conf.RECURSE('pidl')
     conf.RECURSE('selftest')
+    if conf.CONFIG_GET('ENABLE_SELFTEST'):
+        conf.RECURSE('lib/nss_wrapper')
+        conf.RECURSE('lib/resolv_wrapper')
+        conf.RECURSE('lib/socket_wrapper')
+        conf.RECURSE('lib/uid_wrapper')
     conf.RECURSE('source3')
     conf.RECURSE('lib/texpect')
     if conf.env.with_ctdb:
index fc4197441f438894bbc35d443a8a9ee3a247955e..d0fa87b81eae9b40462f2dd6f7ddd5fe2afcaf99 100644 (file)
@@ -2,6 +2,7 @@
 
 # top level waf build script for samba4
 
+import Options
 import os
 srcdir = "."
 
@@ -70,10 +71,14 @@ bld.RECURSE('source4/lib/messaging')
 bld.RECURSE('source4/lib/events')
 bld.RECURSE('source4/lib/cmdline')
 bld.RECURSE('source4/lib/http')
-bld.RECURSE('lib/socket_wrapper')
-bld.RECURSE('lib/resolv_wrapper')
-bld.RECURSE('lib/nss_wrapper')
-bld.RECURSE('lib/uid_wrapper')
+if bld.CONFIG_GET('NSS_WRAPPER'):
+    bld.RECURSE('lib/nss_wrapper')
+if bld.CONFIG_GET('SOCKET_WRAPPER'):
+    bld.RECURSE('lib/socket_wrapper')
+if bld.CONFIG_GET('RESOLV_WRAPPER'):
+    bld.RECURSE('lib/resolv_wrapper')
+if bld.CONFIG_GET('UID_WRAPPER'):
+    bld.RECURSE('lib/uid_wrapper')
 if bld.CHECK_FOR_THIRD_PARTY():
     bld.RECURSE('third_party')
 bld.RECURSE('source4/lib/stream')