summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobert Managan <managan1@llnl.gov>2012-11-07 20:33:34 (GMT)
committerRobert Managan <managan1@llnl.gov>2012-11-07 20:33:34 (GMT)
commit71735a8d66abd7b60f3a3dc96fb1d3cc9fbb3df0 (patch)
treee97d455646b1b7b3c7e1ca3e020b3ce2e95a70a1 /src
parent66ff94edc6d248131e1038a664c79f96805bcd89 (diff)
downloadSCons-71735a8d66abd7b60f3a3dc96fb1d3cc9fbb3df0.zip
SCons-71735a8d66abd7b60f3a3dc96fb1d3cc9fbb3df0.tar.gz
SCons-71735a8d66abd7b60f3a3dc96fb1d3cc9fbb3df0.tar.bz2
Get sym links working with VariantDir and add a test
Diffstat (limited to 'src')
-rw-r--r--src/engine/SCons/Tool/__init__.py9
-rw-r--r--src/engine/SCons/Tool/link.py2
2 files changed, 9 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)
diff --git a/src/engine/SCons/Tool/link.py b/src/engine/SCons/Tool/link.py
index 9c9600e..67d5b19 100644
--- a/src/engine/SCons/Tool/link.py
+++ b/src/engine/SCons/Tool/link.py
@@ -80,6 +80,8 @@ def shlib_emitter(target, source, env):
for name in version_names:
env.SideEffect(name, target[0])
env.Clean(target[0], name)
+ if Verbose:
+ print "shlib_emitter: add side effect - ",name
except KeyError:
version = None
return (target, source)