diff options
author | Pawel Tomulik <ptomulik@meil.pw.edu.pl> | 2015-09-20 02:21:27 (GMT) |
---|---|---|
committer | Pawel Tomulik <ptomulik@meil.pw.edu.pl> | 2015-09-20 02:21:27 (GMT) |
commit | cb508c9a37c2a3cd5fcf55cc1efd4c47a0abdd41 (patch) | |
tree | c678996a1a5aef0cc6dbe40c8f833f35d80dbbd1 /src | |
parent | 9a43408e4419ba54733222df65a38a9d1a925b6d (diff) | |
download | SCons-cb508c9a37c2a3cd5fcf55cc1efd4c47a0abdd41.zip SCons-cb508c9a37c2a3cd5fcf55cc1efd4c47a0abdd41.tar.gz SCons-cb508c9a37c2a3cd5fcf55cc1efd4c47a0abdd41.tar.bz2 |
fix broken soname generator
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/SCons/Defaults.py | 17 | ||||
-rw-r--r-- | src/engine/SCons/Tool/__init__.py | 3 | ||||
-rw-r--r-- | src/engine/SCons/Tool/gnulink.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/sunlink.py | 2 |
4 files changed, 16 insertions, 8 deletions
diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py index db48969..c8170c3 100644 --- a/src/engine/SCons/Defaults.py +++ b/src/engine/SCons/Defaults.py @@ -482,9 +482,14 @@ class Variable_Method_Caller(object): frame = frame.f_back return None -def __libversionflags_string(versionvar): - return '${("%s" in locals() and %s and "_%sFLAGS" in locals()) ' \ - 'and _%sFLAGS or None}' % (versionvar, versionvar, versionvar, versionvar) +# if env[version_var] id defined, returns env[flags_var], otherwise returns None +def __libversionflags(env, version_var, flags_var): + try: + if env[version_var]: + return env[flags_var] + except KeyError: + pass + return None ConstructionEnvironment = { 'BUILDERS' : {}, @@ -504,8 +509,10 @@ ConstructionEnvironment = { '_CPPINCFLAGS' : '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)', '_CPPDEFFLAGS' : '${_defines(CPPDEFPREFIX, CPPDEFINES, CPPDEFSUFFIX, __env__)}', - '__SHLIBVERSIONFLAGS' : __libversionflags_string('SHLIBVERSION'), - '__LDMODULEVERSIONFLAGS' : __libversionflags_string('LDMODULEVERSION'), + '__libversionflags' : __libversionflags, + '__SHLIBVERSIONFLAGS' : '${__libversionflags(__env__,"SHLIBVERSION","_SHLIBVERSIONFLAGS")}', + '__LDMODULEVERSIONFLAGS' : '${__libversionflags(__env__,"LDMODULEVERSION","_LDMODULEVERSIONFLAGS")}', + 'TEMPFILE' : NullCmdGenerator, 'Dir' : Variable_Method_Caller('TARGET', 'Dir'), 'Dirs' : Variable_Method_Caller('TARGET', 'Dirs'), diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index 357b765..96b9d98 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -567,8 +567,9 @@ class _LibSonameGenerator(_LibInfoGeneratorBase): if Verbose: print "_LibSonameGenerator: version=%r" % version if version: + prefix = self.get_lib_prefix(env,**kw2) suffix = self.get_lib_suffix(env,**kw2) - soname = self.generate_versioned_lib_info(env, [libnode, version, suffix], **kw2) + soname = self.generate_versioned_lib_info(env, [libnode, version, prefix, suffix], **kw2) if not soname: # fallback to library name (as returned by appropriate _LibNameGenerator) diff --git a/src/engine/SCons/Tool/gnulink.py b/src/engine/SCons/Tool/gnulink.py index 92c38c4..2e0ed03 100644 --- a/src/engine/SCons/Tool/gnulink.py +++ b/src/engine/SCons/Tool/gnulink.py @@ -83,7 +83,7 @@ def generate(env): 'VersionedShLibName' : link._versioned_shlib_name, 'VersionedLdModName' : link._versioned_ldmod_name, 'VersionedShLibSoname' : link._versioned_shlib_soname, - 'VersionedLdModSoname' : link._versioned_shlib_soname, + 'VersionedLdModSoname' : link._versioned_ldmod_soname, } def exists(env): diff --git a/src/engine/SCons/Tool/sunlink.py b/src/engine/SCons/Tool/sunlink.py index c9bb17d..751bf92 100644 --- a/src/engine/SCons/Tool/sunlink.py +++ b/src/engine/SCons/Tool/sunlink.py @@ -84,7 +84,7 @@ def generate(env): 'VersionedShLibName' : link._versioned_shlib_name, 'VersionedLdModName' : link._versioned_ldmod_name, 'VersionedShLibSoname' : link._versioned_shlib_soname, - 'VersionedLdModSoname' : link._versioned_shlib_soname, + 'VersionedLdModSoname' : link._versioned_ldmod_soname, } def exists(env): |