diff options
author | David Rothenberger <daveroth@acm.org> | 2013-08-17 19:12:56 (GMT) |
---|---|---|
committer | David Rothenberger <daveroth@acm.org> | 2013-08-17 19:12:56 (GMT) |
commit | f837e2e6511cc8049e5a765c9af25afc9fd730fe (patch) | |
tree | 1e31f698424a467ed6ac3d722037912c0224f194 /src/engine/SCons/Tool/link.py | |
parent | a0ca59da5a6b076f34c1fb5ebe713a1d1ce7d085 (diff) | |
download | SCons-f837e2e6511cc8049e5a765c9af25afc9fd730fe.zip SCons-f837e2e6511cc8049e5a765c9af25afc9fd730fe.tar.gz SCons-f837e2e6511cc8049e5a765c9af25afc9fd730fe.tar.bz2 |
Add a cyglink tool
Add cyglink, a specialization of gnulink with the following
properties:
1. Set SHLIBPREFIX to "cyg" and SHLIBSUFFIX = ".dll".
2. Remove any "lib" after "cyg", to accommodate build scripts that
name libraries "libFoo".
3. Create DLL import libraries.
Diffstat (limited to 'src/engine/SCons/Tool/link.py')
-rw-r--r-- | src/engine/SCons/Tool/link.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/link.py b/src/engine/SCons/Tool/link.py index 2ba419e..3f20fe0 100644 --- a/src/engine/SCons/Tool/link.py +++ b/src/engine/SCons/Tool/link.py @@ -127,6 +127,18 @@ def shlib_emitter_names(target, source, env): print "shlib_emitter_names: side effect: ", name # add version_name to list of names to be a Side effect version_names.append(version_name) + elif platform == 'cygwin': + shlib_suffix = env.subst('$SHLIBSUFFIX') + name = target[0].name + # generate library name with the version number + suffix_re = re.escape(shlib_suffix) + version_name = re.sub(suffix_re, '-' + re.sub('\.', '-', version) + shlib_suffix, name) + if Verbose: + print "shlib_emitter_names: target is ", version_name + print "shlib_emitter_names: side effect: ", name + # add version_name to list of names to be a Side effect + version_names.append(version_name) + except KeyError: version = None return version_names |