mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
samba_abi: Also sort ABI files properly so symbols end up in the right version.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 12 02:45:20 CET 2011 on sn-devel-104
This commit is contained in:
parent
1d1e5cbd27
commit
a051b40075
@ -10,6 +10,8 @@ abi_type_maps = {
|
|||||||
'struct __va_list_tag *' : 'va_list'
|
'struct __va_list_tag *' : 'va_list'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
version_key = lambda x: map(int, x.split("."))
|
||||||
|
|
||||||
def normalise_signature(sig):
|
def normalise_signature(sig):
|
||||||
'''normalise a signature from gdb'''
|
'''normalise a signature from gdb'''
|
||||||
sig = sig.strip()
|
sig = sig.strip()
|
||||||
@ -162,7 +164,7 @@ def abi_write_vscript(vscript, libname, current_version, versions, symmap, abi_m
|
|||||||
|
|
||||||
f = open(vscript, mode='w')
|
f = open(vscript, mode='w')
|
||||||
last_key = ""
|
last_key = ""
|
||||||
versions = sorted(versions, key=lambda x: map(int, x.split(".")))
|
versions = sorted(versions, key=version_key)
|
||||||
for k in versions:
|
for k in versions:
|
||||||
symver = "%s_%s" % (libname, k)
|
symver = "%s_%s" % (libname, k)
|
||||||
if symver == current_version:
|
if symver == current_version:
|
||||||
@ -205,7 +207,9 @@ def ABI_VSCRIPT(bld, libname, abi_directory, version, vscript, abi_match=None):
|
|||||||
'''generate a vscript file for our public libraries'''
|
'''generate a vscript file for our public libraries'''
|
||||||
if abi_directory:
|
if abi_directory:
|
||||||
source = bld.path.ant_glob('%s/%s-[0-9]*.sigs' % (abi_directory, libname))
|
source = bld.path.ant_glob('%s/%s-[0-9]*.sigs' % (abi_directory, libname))
|
||||||
source = sorted(source.split())
|
def abi_file_key(path):
|
||||||
|
return version_key(path[:-len(".sigs")].rsplit("-")[-1])
|
||||||
|
source = sorted(source.split(), key=abi_file_key)
|
||||||
else:
|
else:
|
||||||
source = ''
|
source = ''
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user