summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2012-08-30 18:46:23 +0300
committerAlexander Bokovoy <ab@samba.org>2012-09-07 12:31:42 +0200
commit9c3e294400234ebdf9b98031bae583524fd0b0ac (patch)
treefcc249dd3ec44842eb5ea13ef351ec83b648a502 /buildtools
parentc63dcc97b695ceab2bbd8f421f56b623b0d867a2 (diff)
downloadsamba-9c3e294400234ebdf9b98031bae583524fd0b0ac.tar.gz
samba-9c3e294400234ebdf9b98031bae583524fd0b0ac.tar.bz2
samba-9c3e294400234ebdf9b98031bae583524fd0b0ac.zip
wafsamba/samba_abi: allow negative matches in abi_match
abi_match keyword for samba libraries allows to selectively apply ABI versions. samba_abi.py implied !sym to be used to say 'all symbols but this one' but the actual demotion of !sym to the local scope was not implemented. Now abi_match='!sym' properly moves symbol to a local scope.
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_abi.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py
index 69da7bd9a5..f5cac8a134 100644
--- a/buildtools/wafsamba/samba_abi.py
+++ b/buildtools/wafsamba/samba_abi.py
@@ -182,10 +182,19 @@ def abi_write_vscript(vscript, libname, current_version, versions, symmap, abi_m
f.write("}%s;\n\n" % last_key)
last_key = " %s" % symver
f.write("%s {\n" % current_version)
+ local_abi = filter(lambda x: x[0] == '!', abi_match)
+ global_abi = filter(lambda x: x[0] != '!', abi_match)
f.write("\tglobal:\n")
- for x in abi_match:
- f.write("\t\t%s;\n" % x)
- if abi_match != ["*"]:
+ if len(global_abi) > 0:
+ for x in global_abi:
+ f.write("\t\t%s;\n" % x)
+ else:
+ f.write("\t\t*;\n")
+ if len(local_abi) > 0:
+ f.write("\tlocal:\n")
+ for x in local_abi:
+ f.write("\t\t%s;\n" % x[1:])
+ elif abi_match != ["*"]:
f.write("\tlocal: *;\n")
f.write("};\n")
f.close()