diff options
author | Robert Managan <ramanagan@att.net> | 2012-10-17 04:28:28 (GMT) |
---|---|---|
committer | Robert Managan <ramanagan@att.net> | 2012-10-17 04:28:28 (GMT) |
commit | 54128aa8e74ffb6a8a708e58db210e47956adf48 (patch) | |
tree | 25ed81f7d4f9f2c2c370faa9d78bd75a2ffc61e7 /src/engine/SCons/Tool/link.py | |
parent | f494d3c3cab9f0bbcbe5b79d8847faca56c57e8b (diff) | |
download | SCons-54128aa8e74ffb6a8a708e58db210e47956adf48.zip SCons-54128aa8e74ffb6a8a708e58db210e47956adf48.tar.gz SCons-54128aa8e74ffb6a8a708e58db210e47956adf48.tar.bz2 |
Add library version support to Shared Lib builder
Diffstat (limited to 'src/engine/SCons/Tool/link.py')
-rw-r--r-- | src/engine/SCons/Tool/link.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/link.py b/src/engine/SCons/Tool/link.py index fae7f63..2d67a1a 100644 --- a/src/engine/SCons/Tool/link.py +++ b/src/engine/SCons/Tool/link.py @@ -66,6 +66,17 @@ def smart_link(source, target, env, for_signature): def shlib_emitter(target, source, env): for tgt in target: tgt.attributes.shared = 1 + try: + # target[0] comes in as libtest.so. Add the version extensions + version = env.subst('$SHLIBVERSION') + if version: + versionparts = version.split('.') + name = str(target[0]) + for ver in versionparts: + name = name + '.' + ver + target.insert(0, env.fs.File(name)) + except KeyError: + version = None return (target, source) def generate(env): |