diff options
author | Dirk Baechle <dl9obn@darc.de> | 2014-12-19 14:59:20 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2014-12-19 14:59:20 (GMT) |
commit | a759567a12fbd11989bea5f8eb0238639ec15e8b (patch) | |
tree | bd3e106ab9d2a4022e4f6cb6cfe5fbdc15f0d79a /src/engine/SCons/Tool/__init__.py | |
parent | f0121389aa88ab9a3d232f5e516850d2aad2bf00 (diff) | |
download | SCons-a759567a12fbd11989bea5f8eb0238639ec15e8b.zip SCons-a759567a12fbd11989bea5f8eb0238639ec15e8b.tar.gz SCons-a759567a12fbd11989bea5f8eb0238639ec15e8b.tar.bz2 |
- switching versioned shared libs to using Node.attributes
Diffstat (limited to 'src/engine/SCons/Tool/__init__.py')
-rw-r--r-- | src/engine/SCons/Tool/__init__.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index c6da57d..0447dd9 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -293,7 +293,10 @@ symlinks for the platform we are on""" version = None # libname includes the version number if one was given - libname = target[0].name + if hasattr(target[0].attributes, 'shlibname'): + libname = target[0].attributes.shlibname + else: + libname = target[0].name platform = env.subst('$PLATFORM') shlib_suffix = env.subst('$SHLIBSUFFIX') shlink_flags = SCons.Util.CLVar(env.subst('$SHLINKFLAGS')) @@ -340,12 +343,22 @@ symlinks for the platform we are on""" if version: # here we need the full pathname so the links end up in the right directory - libname = target[0].path + if hasattr(target[0].attributes, 'shlibname'): + libname = target[0].attributes.shlibname + else: + libname = target[0].path + if Verbose: + print "VerShLib: target lib is = ", libname + print "VerShLib: name is = ", target[0].name + print "VerShLib: dir is = ", target[0].dir.path linknames = VersionShLibLinkNames(version, libname, env) if Verbose: print "VerShLib: linknames ",linknames # Here we just need the file name w/o path as the target of the link - lib_ver = target[0].name + if hasattr(target[0].attributes, 'shlibname'): + lib_ver = target[0].attributes.shlibname + else: + lib_ver = target[0].name # make symlink of adjacent names in linknames for count in range(len(linknames)): linkname = linknames[count] |