diff options
author | Robert Managan <managan1@llnl.gov> | 2012-11-07 20:33:34 (GMT) |
---|---|---|
committer | Robert Managan <managan1@llnl.gov> | 2012-11-07 20:33:34 (GMT) |
commit | 71735a8d66abd7b60f3a3dc96fb1d3cc9fbb3df0 (patch) | |
tree | e97d455646b1b7b3c7e1ca3e020b3ce2e95a70a1 /src/engine/SCons/Tool/__init__.py | |
parent | 66ff94edc6d248131e1038a664c79f96805bcd89 (diff) | |
download | SCons-71735a8d66abd7b60f3a3dc96fb1d3cc9fbb3df0.zip SCons-71735a8d66abd7b60f3a3dc96fb1d3cc9fbb3df0.tar.gz SCons-71735a8d66abd7b60f3a3dc96fb1d3cc9fbb3df0.tar.bz2 |
Get sym links working with VariantDir and add a test
Diffstat (limited to 'src/engine/SCons/Tool/__init__.py')
-rw-r--r-- | src/engine/SCons/Tool/__init__.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index 36e2a56..35a05f0 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -291,6 +291,7 @@ symlinks for the platform we are on""" print "VersionShLib: libname = ",libname print "VersionShLib: platform = ",platform print "VersionShLib: shlib_suffix = ",shlib_suffix + print "VersionShLib: target = ",str(target[0]) if version: # set the shared library link flags @@ -319,11 +320,15 @@ symlinks for the platform we are on""" result = SCons.Defaults.ShLinkAction(target, source, envlink) if version: + # here we need the full pathname so the links end up in the right directory + libname = target[0].path linknames = VersionShLibLinkNames(version, libname, env) - # keep name with version in it - lib_ver = libname + # Here we just need the file name w/o path as the target of the link + lib_ver = target[0].name for linkname in linknames: os.symlink(lib_ver,linkname) + if Verbose: + print "VerShLib: made sym link of %s -> %s" % (linkname, lib_ver) return result ShLibAction = SCons.Action.Action(VersionedSharedLibrary, None) |