1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

waf: Rename some BUNDLED_ functios to PRIVATE_.

This commit is contained in:
Jelmer Vernooij 2010-10-23 23:26:43 +02:00
parent 18103d34e2
commit 49ef288819
9 changed files with 26 additions and 26 deletions

View File

@ -4,13 +4,13 @@ from Configure import conf
import Logs
from samba_utils import *
def BUNDLED_NAME(bld, name, bundled_extension, private_library):
def PRIVATE_NAME(bld, name, bundled_extension, private_library):
'''possibly rename a library to include a bundled extension'''
if bld.env.DISABLE_SHARED or not bundled_extension:
return name
if name in bld.env.BUNDLED_EXTENSION_EXCEPTION and not private_library:
if name in bld.env.PRIVATE_EXTENSION_EXCEPTION and not private_library:
return name
extension = getattr(bld.env, 'BUNDLED_EXTENSION', '')
extension = getattr(bld.env, 'PRIVATE_EXTENSION', '')
if extension:
return name + '-' + extension
return name
@ -46,13 +46,13 @@ def BUILTIN_DEFAULT(opt, builtins):
Options.Handler.BUILTIN_DEFAULT = BUILTIN_DEFAULT
def BUNDLED_EXTENSION_DEFAULT(opt, extension, noextension=''):
'''set a default bundled library extension'''
if 'BUNDLED_EXTENSION_DEFAULT' in Options.options:
def PRIVATE_EXTENSION_DEFAULT(opt, extension, noextension=''):
'''set a default private library extension'''
if 'PRIVATE_EXTENSION_DEFAULT' in Options.options:
return
Options.options['BUNDLED_EXTENSION_DEFAULT'] = extension
Options.options['BUNDLED_EXTENSION_EXCEPTION'] = noextension
Options.Handler.BUNDLED_EXTENSION_DEFAULT = BUNDLED_EXTENSION_DEFAULT
Options.options['PRIVATE_EXTENSION_DEFAULT'] = extension
Options.options['PRIVATE_EXTENSION_EXCEPTION'] = noextension
Options.Handler.PRIVATE_EXTENSION_DEFAULT = PRIVATE_EXTENSION_DEFAULT
def minimum_library_version(conf, libname, default):

View File

@ -179,7 +179,7 @@ def SAMBA_LIBRARY(bld, libname, source,
while bundled_name.startswith("lib"):
bundled_name = bundled_name[3:]
else:
bundled_name = BUNDLED_NAME(bld, libname, bundled_extension, private_library)
bundled_name = PRIVATE_NAME(bld, libname, bundled_extension, private_library)
features = 'cc cshlib symlink_lib install_lib'
if target_type == 'PYTHON':

View File

@ -27,15 +27,15 @@ 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='')
extension_default = Options.options['BUNDLED_EXTENSION_DEFAULT']
gr.add_option('--bundled-library-extension',
help=("name extension for bundled libraries [%s]" % extension_default),
action="store", dest='BUNDLED_EXTENSION', default=extension_default)
extension_default = Options.options['PRIVATE_EXTENSION_DEFAULT']
gr.add_option('--private-library-extension',
help=("name extension for private libraries [%s]" % extension_default),
action="store", dest='PRIVATE_EXTENSION', default=extension_default)
extension_exception = Options.options['BUNDLED_EXTENSION_EXCEPTION']
gr.add_option('--bundled-extension-exception',
help=("comman separated list of libraries to not apply extension to [%s]" % extension_exception),
action="store", dest='BUNDLED_EXTENSION_EXCEPTION', default=extension_exception)
extension_exception = Options.options['PRIVATE_EXTENSION_EXCEPTION']
gr.add_option('--private-extension-exception',
help=("comma separated list of libraries to not apply extension to [%s]" % extension_exception),
action="store", dest='PRIVATE_EXTENSION_EXCEPTION', default=extension_exception)
builtin_defauilt = Options.options['BUILTIN_LIBRARIES_DEFAULT']
gr.add_option('--builtin-libraries',
@ -202,8 +202,8 @@ def configure(conf):
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(',')
conf.env.PRIVATE_EXTENSION = Options.options.PRIVATE_EXTENSION
conf.env.PRIVATE_EXTENSION_EXCEPTION = Options.options.PRIVATE_EXTENSION_EXCEPTION.split(',')
conf.env.CROSS_COMPILE = Options.options.CROSS_COMPILE
conf.env.CROSS_EXECUTE = Options.options.CROSS_EXECUTE

View File

@ -20,7 +20,7 @@ samba_dist.DIST_DIRS('lib/replace buildtools:buildtools')
def set_options(opt):
opt.BUILTIN_DEFAULT('NONE')
opt.BUNDLED_EXTENSION_DEFAULT('')
opt.PRIVATE_EXTENSION_DEFAULT('')
opt.RECURSE('buildtools/wafsamba')
@wafsamba.runonce

View File

@ -24,7 +24,7 @@ samba_dist.DIST_DIRS('lib/talloc:. lib/replace:lib/replace buildtools:buildtools
def set_options(opt):
opt.BUILTIN_DEFAULT('replace')
opt.BUNDLED_EXTENSION_DEFAULT('talloc', noextension='talloc')
opt.PRIVATE_EXTENSION_DEFAULT('talloc', noextension='talloc')
opt.RECURSE('lib/replace')
opt.add_option('--enable-talloc-compat1',
help=("Build talloc 1.x.x compat library [False]"),

View File

@ -19,7 +19,7 @@ samba_dist.DIST_DIRS('lib/tdb:. lib/replace:lib/replace buildtools:buildtools')
def set_options(opt):
opt.BUILTIN_DEFAULT('replace')
opt.BUNDLED_EXTENSION_DEFAULT('tdb', noextension='tdb')
opt.PRIVATE_EXTENSION_DEFAULT('tdb', noextension='tdb')
opt.RECURSE('lib/replace')
if opt.IN_LAUNCH_DIR():
opt.add_option('--disable-python',

View File

@ -19,7 +19,7 @@ samba_dist.DIST_DIRS('lib/tevent:. lib/replace:lib/replace lib/talloc:lib/talloc
def set_options(opt):
opt.BUILTIN_DEFAULT('replace')
opt.BUNDLED_EXTENSION_DEFAULT('tevent', noextension='tevent')
opt.PRIVATE_EXTENSION_DEFAULT('tevent', noextension='tevent')
opt.RECURSE('lib/replace')
opt.RECURSE('lib/talloc')
if opt.IN_LAUNCH_DIR():

View File

@ -22,7 +22,7 @@ samba_dist.DIST_DIRS('''source4/lib/ldb:. lib/replace:lib/replace lib/talloc:lib
def set_options(opt):
opt.BUILTIN_DEFAULT('replace')
opt.BUNDLED_EXTENSION_DEFAULT('ldb', noextension='ldb')
opt.PRIVATE_EXTENSION_DEFAULT('ldb', noextension='ldb')
opt.RECURSE('lib/tdb')
opt.RECURSE('lib/tevent')
opt.RECURSE('lib/replace')

View File

@ -42,7 +42,7 @@ Options.default_prefix = '/usr/local/samba'
def set_options(opt):
opt.BUILTIN_DEFAULT('replace')
opt.BUNDLED_EXTENSION_DEFAULT('samba4')
opt.PRIVATE_EXTENSION_DEFAULT('samba4')
opt.RECURSE('../lib/replace')
opt.RECURSE('dynconfig')
opt.RECURSE('scripting/python')