summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2014-05-07 10:43:51 +0200
committerSumit Bose <sbose@redhat.com>2014-06-17 12:55:14 +0200
commit207995f0a09be5a520fa20856289444d8dfade9b (patch)
tree899ccc94d6ffc1b14f014d97fe172fb6d3a3b5a5
parenta4c50e233265ef4fd0d472cbded0bb8346ef0528 (diff)
downloadsamba-207995f0a09be5a520fa20856289444d8dfade9b.zip
samba-207995f0a09be5a520fa20856289444d8dfade9b.tar.gz
samba-207995f0a09be5a520fa20856289444d8dfade9b.tar.xz
wafsamba: add optional vscript(default=NULL) to SAMBA_LIBRARY()
-rw-r--r--buildtools/wafsamba/wafsamba.py52
1 files changed, 27 insertions, 25 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 8ec4cb8..d6cb9fc 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(