selftest: Rework Samba3.pm process termination
[ira/wip.git] / wscript
diff --git a/wscript b/wscript
index 1b50baf241cd518bb96a270bcd32c1ca99800b4d..5901f5af57520930cf7fa68289a83c26aca72a20 100755 (executable)
--- a/wscript
+++ b/wscript
@@ -12,12 +12,11 @@ import wafsamba, Options, samba_dist, Scripting, Utils, samba_version
 
 
 samba_dist.DIST_DIRS('.')
+samba_dist.DIST_BLACKLIST('.gitignore .bzrignore')
 
 # install in /usr/local/samba by default
 Options.default_prefix = '/usr/local/samba'
 
-os.environ['TOPLEVEL_BUILD'] = '1'
-
 def set_options(opt):
     opt.BUILTIN_DEFAULT('NONE')
     opt.PRIVATE_EXTENSION_DEFAULT('samba4')
@@ -42,11 +41,9 @@ def set_options(opt):
 
 
 def configure(conf):
-    conf.env.toplevel_build = True
     version = samba_version.load_version(env=conf.env)
 
     conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)
-    conf.DEFINE('_SAMBA_WAF_BUILD_', version.MAJOR)
     conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True)
     conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
 
@@ -101,19 +98,12 @@ def configure(conf):
     conf.RECURSE('lib/popt')
     conf.RECURSE('lib/subunit/c')
     conf.RECURSE('libcli/smbreadline')
+    conf.RECURSE('lib/crypto')
     conf.RECURSE('pidl')
     conf.RECURSE('selftest')
     conf.RECURSE('source3')
 
-    # we don't want any libraries or modules to rely on runtime
-    # resolution of symbols
-    if sys.platform != "openbsd4":
-        conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
-
-    if sys.platform != "openbsd4" and conf.env.undefined_ignore_ldflags == []:
-        if conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup']):
-            conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup']
-
+    conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()
 
     # gentoo always adds this. We want our normal build to be as
     # strict as the strictest OS we support, so adding this here
@@ -164,6 +154,14 @@ def pydoctor(ctx):
     print("Running: %s" % cmd)
     os.system(cmd)
 
+
+def pep8(ctx):
+    '''run pep8 validator'''
+    cmd='PYTHONPATH=bin/python pep8 -r bin/python/samba'
+    print("Running: %s" % cmd)
+    os.system(cmd)
+
+
 def wafdocs(ctx):
     '''build wafsamba apidocs'''
     from samba_utils import recursive_dirlist