From 207995f0a09be5a520fa20856289444d8dfade9b Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 7 May 2014 10:43:51 +0200 Subject: wafsamba: add optional vscript(default=NULL) to SAMBA_LIBRARY() --- buildtools/wafsamba/wafsamba.py | 52 +++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 8ec4cb80863..d6cb9fc2b56 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -131,6 +131,7 @@ def SAMBA_LIBRARY(bld, libname, source, grouping_library=False, allow_undefined_symbols=False, allow_warnings=True, + vscript=None, enabled=True): '''define a Samba library''' @@ -226,31 +227,32 @@ def SAMBA_LIBRARY(bld, libname, source, if abi_directory: features += ' abi_check' - vscript = None - if bld.env.HAVE_LD_VERSION_SCRIPT: - if private_library: - version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION) - elif vnum: - version = "%s_%s" % (libname, vnum) - else: - version = None - if version: - vscript = "%s.vscript" % libname - bld.ABI_VSCRIPT(libname, abi_directory, version, vscript, - abi_match) - fullname = apply_pattern(bundled_name, bld.env.shlib_PATTERN) - fullpath = bld.path.find_or_declare(fullname) - vscriptpath = bld.path.find_or_declare(vscript) - if not fullpath: - raise Utils.WafError("unable to find fullpath for %s" % fullname) - if not vscriptpath: - raise Utils.WafError("unable to find vscript path for %s" % vscript) - bld.add_manual_dependency(fullpath, vscriptpath) - if Options.is_install: - # also make the .inst file depend on the vscript - instname = apply_pattern(bundled_name + '.inst', bld.env.shlib_PATTERN) - bld.add_manual_dependency(bld.path.find_or_declare(instname), bld.path.find_or_declare(vscript)) - vscript = os.path.join(bld.path.abspath(bld.env), vscript) +# vscript = None + if not vscript: + if bld.env.HAVE_LD_VERSION_SCRIPT: + if private_library: + version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION) + elif vnum: + version = "%s_%s" % (libname, vnum) + else: + version = None + if version: + vscript = "%s.vscript" % libname + bld.ABI_VSCRIPT(libname, abi_directory, version, vscript, + abi_match) + fullname = apply_pattern(bundled_name, bld.env.shlib_PATTERN) + fullpath = bld.path.find_or_declare(fullname) + vscriptpath = bld.path.find_or_declare(vscript) + if not fullpath: + raise Utils.WafError("unable to find fullpath for %s" % fullname) + if not vscriptpath: + raise Utils.WafError("unable to find vscript path for %s" % vscript) + bld.add_manual_dependency(fullpath, vscriptpath) + if Options.is_install: + # also make the .inst file depend on the vscript + instname = apply_pattern(bundled_name + '.inst', bld.env.shlib_PATTERN) + bld.add_manual_dependency(bld.path.find_or_declare(instname), bld.path.find_or_declare(vscript)) + vscript = os.path.join(bld.path.abspath(bld.env), vscript) bld.SET_BUILD_GROUP(group) t = bld( -- cgit