libndr: Avoid assigning duplicate versions to symbols
[amitay/samba.git] / wscript
diff --git a/wscript b/wscript
index 579d35f27191de0feb1a822063784451874b650f..334b2988234d67759ce9c915be482d4c114775ad 100644 (file)
--- a/wscript
+++ b/wscript
@@ -47,6 +47,25 @@ def options(opt):
     opt.RECURSE('lib/crypto')
     opt.RECURSE('ctdb')
 
+# Optional Libraries
+# ------------------
+#
+# Most of the calls to opt.add_option() use default=True for the --with case
+#
+# To assist users and distributors to build Samba with the full feature
+# set, the build system will abort if our dependent libraries and their
+# header files are not found on the target system.  This will mean for
+# example, that xattr, acl and ldap headers must be installed for the
+# default build to complete.  The configure system will check for these
+# headers, and the error message will indicate the option (such as
+# --without-acl-support) that can be specified to skip this requirement.
+#
+# This will assist users and in particular distributors in building fully
+# functional packages, while allowing those on systems truly without these
+# facilities to continue to build Samba after careful consideration.
+#
+# It also ensures our container image generation in bootstrap/ is correct
+# as otherwise a missing package there would just silently work
 
     opt.samba_add_onoff_option('pthreadpool', with_name="enable", without_name="disable", default=True)
 
@@ -321,7 +340,7 @@ def configure(conf):
     # allows us to find problems on our development hosts faster.
     # It also results in faster load time.
 
-    conf.env.asneeded_ldflags = conf.ADD_LDFLAGS('-Wl,--as-needed', testflags=True)
+    conf.add_as_needed()
 
     if not conf.CHECK_NEED_LC("-lc not needed"):
         conf.ADD_LDFLAGS('-lc', testflags=False)
@@ -352,6 +371,9 @@ def configure(conf):
                          msg="Checking compiler for full RELRO support"):
             conf.env['ENABLE_RELRO'] = True
 
+    # #line statements in these generated files cause issues for lcov
+    conf.env.FLEXFLAGS += ["--noline"]
+
     conf.SAMBA_CONFIG_H('include/config.h')
 
 def etags(ctx):
@@ -419,10 +441,9 @@ def wafdocs(ctx):
     os.system('pwd')
     list = recursive_dirlist('../buildtools/wafsamba', '.', pattern='*.py')
 
-    cmd='PYTHONPATH=bin/python pydoctor --project-name=wafsamba --project-url=http://www.samba.org --make-html --docformat=restructuredtext'
     print(list)
-    for f in list:
-        cmd += ' --add-module %s' % f
+    cmd='PYTHONPATH=bin/python pydoctor --project-name=wafsamba --project-url=http://www.samba.org --make-html --docformat=restructuredtext' +\
+        "".join(' --add-module %s' % f for f in list)
     print("Running: %s" % cmd)
     status = os.system(cmd)
     if os.WEXITSTATUS(status):