diff options
-rw-r--r-- | buildtools/wafsamba/samba_bundled.py | 4 | ||||
-rw-r--r-- | buildtools/wafsamba/wafsamba.py | 3 | ||||
-rwxr-xr-x | buildtools/wafsamba/wscript | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py index c5b4022297..1a5d565b38 100644 --- a/buildtools/wafsamba/samba_bundled.py +++ b/buildtools/wafsamba/samba_bundled.py @@ -81,6 +81,10 @@ def LIB_MUST_BE_BUNDLED(conf, libname): return ('ALL' in conf.env.BUNDLED_LIBS or libname in conf.env.BUNDLED_LIBS) +@conf +def LIB_MUST_BE_PRIVATE(conf, libname): + return ('ALL' in conf.env.PRIVATE_LIBS or + libname in conf.env.PRIVATE_LIBS) @conf def CHECK_PREREQUISITES(conf, prereqs): diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 317bca1275..534bace25b 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -132,6 +132,9 @@ def SAMBA_LIBRARY(bld, libname, source, enabled=True): '''define a Samba library''' + if LIB_MUST_BE_PRIVATE(bld, libname): + private_library=True + if not enabled: SET_TARGET_TYPE(bld, libname, 'DISABLED') return diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index ff18777575..4db341202e 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -27,6 +27,10 @@ def set_options(opt): help=("comma separated list of bundled libraries. May include !LIBNAME to disable bundling a library. Can be 'NONE' or 'ALL' [auto]"), action="store", dest='BUNDLED_LIBS', default='') + gr.add_option('--private-libraries', + help=("comma separated list of normally public libraries to build instead as private libraries. May include !LIBNAME to disable making a library private. Can be 'NONE' or 'ALL' [auto]"), + action="store", dest='PRIVATE_LIBS', default='') + extension_default = Options.options['PRIVATE_EXTENSION_DEFAULT'] gr.add_option('--private-library-extension', help=("name extension for private libraries [%s]" % extension_default), @@ -233,6 +237,7 @@ def configure(conf): conf.env.MODULESDIR = Options.options.MODULESDIR conf.env.PRIVATELIBDIR = Options.options.PRIVATELIBDIR conf.env.BUNDLED_LIBS = Options.options.BUNDLED_LIBS.split(',') + conf.env.PRIVATE_LIBS = Options.options.PRIVATE_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(',') |