[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Wed Apr 21 01:17:42 MDT 2010


The branch, master has been updated
       via  681f3da... build: added --nonshared-binary=LIST option
      from  1d5aee6... s4-waf: python devel headers are mandatory for the source4 build

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 681f3dad7c32fc5dcf51ceda889d1f115a641aaa
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Apr 21 17:13:16 2010 +1000

    build: added --nonshared-binary=LIST option
    
    This allows you to specify some binaries that should be built without
    shared libs. A non-shared smbtorture will make testing s3 in the build
    farm easier

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafsamba/samba_bundled.py |    8 ++++++++
 buildtools/wafsamba/samba_deps.py    |   13 +++++++++++++
 buildtools/wafsamba/wscript          |    4 ++++
 3 files changed, 25 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index f668d56..f105a2d 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -127,3 +127,11 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
         sys.exit(1)
     return False
 
+def NONSHARED_BINARY(bld, name):
+    '''return True if a binary should be built without non-system shared libs'''
+    if bld.env.DISABLE_SHARED:
+        return True
+    return target_in_list(name, bld.env.NONSHARED_BINARIES, False)
+Build.BuildContext.NONSHARED_BINARY = NONSHARED_BINARY
+
+
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index 7beec29..8911db3 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -642,6 +642,19 @@ def calculate_final_deps(bld, tgt_list, loops):
         if t.sname in t.final_objects:
             t.final_objects.remove(t.sname)
 
+    # handle any non-shared binaries
+    for t in tgt_list:
+        if t.samba_type == 'BINARY' and bld.NONSHARED_BINARY(t.sname):
+            # replace lib deps with objlist deps
+            for l in t.final_libs:
+                objname = l + '.objlist'
+                t2 = bld.name_to_obj(objname, bld.env)
+                if t2 is None:
+                    Logs.error('ERROR: subsystem %s not found' % objname)
+                    sys.exit(1)
+                t.final_objects.add(objname)
+                t.final_objects = t.final_objects.union(extended_objects(bld, t2, set()))
+            t.final_libs = set()
 
     # find any library loops
     for t in tgt_list:
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 72e0e90..76e9b1f 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -46,6 +46,9 @@ def set_options(opt):
     gr.add_option('--disable-rpath-install',
                    help=("Disable use of rpath for installed binaries"),
                    action="store_true", dest='disable_rpath_install', default=False)
+    gr.add_option('--nonshared-binary',
+                   help=("Disable use of shared libs for the listed binaries"),
+                   action="store", dest='NONSHARED_BINARIES', default='')
 
     opt.add_option('--with-modulesdir',
                    help=("modules directory [PREFIX/modules]"),
@@ -149,6 +152,7 @@ def configure(conf):
     conf.env.BUNDLED_LIBS = Options.options.BUNDLED_LIBS.split(',')
     conf.env.BUILTIN_LIBRARIES = Options.options.BUILTIN_LIBRARIES.split(',')
     conf.env.DISABLE_SHARED = Options.options.disable_shared
+    conf.env.NONSHARED_BINARIES = Options.options.NONSHARED_BINARIES.split(',')
 
     conf.env.BUNDLED_EXTENSION = Options.options.BUNDLED_EXTENSION
     conf.env.BUNDLED_EXTENSION_EXCEPTION = Options.options.BUNDLED_EXTENSION_EXCEPTION.split(',')


-- 
Samba Shared Repository


More information about the samba-cvs mailing list