summaryrefslogtreecommitdiff
path: root/engine/SCons/Defaults.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-11-16 05:58:13 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-11-16 05:58:13 +0100
commit6a570afd28bccdb118edde36488ba9834494d6c7 (patch)
tree162100eb912a704d570559c85484ae6d6943fc76 /engine/SCons/Defaults.py
parent72c39ad485d174c2e8e1fef34b8e9e392a94458a (diff)
Imported Upstream version 2.4.1upstream/2.4.1
Diffstat (limited to 'engine/SCons/Defaults.py')
-rw-r--r--engine/SCons/Defaults.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/engine/SCons/Defaults.py b/engine/SCons/Defaults.py
index b4cbb9a..8c86c95 100644
--- a/engine/SCons/Defaults.py
+++ b/engine/SCons/Defaults.py
@@ -33,7 +33,7 @@ from distutils.msvccompiler.
#
from __future__ import division
-__revision__ = "src/engine/SCons/Defaults.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+__revision__ = "src/engine/SCons/Defaults.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
import os
@@ -482,6 +482,15 @@ class Variable_Method_Caller(object):
frame = frame.f_back
return None
+# 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' : {},
'SCANNERS' : [],
@@ -499,6 +508,12 @@ ConstructionEnvironment = {
'_LIBDIRFLAGS' : '$( ${_concat(LIBDIRPREFIX, LIBPATH, LIBDIRSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)',
'_CPPINCFLAGS' : '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)',
'_CPPDEFFLAGS' : '${_defines(CPPDEFPREFIX, CPPDEFINES, CPPDEFSUFFIX, __env__)}',
+
+ '__libversionflags' : __libversionflags,
+ '__SHLIBVERSIONFLAGS' : '${__libversionflags(__env__,"SHLIBVERSION","_SHLIBVERSIONFLAGS")}',
+ '__LDMODULEVERSIONFLAGS' : '${__libversionflags(__env__,"LDMODULEVERSION","_LDMODULEVERSIONFLAGS")}',
+ '__DSHLIBVERSIONFLAGS' : '${__libversionflags(__env__,"DSHLIBVERSION","_DSHLIBVERSIONFLAGS")}',
+
'TEMPFILE' : NullCmdGenerator,
'Dir' : Variable_Method_Caller('TARGET', 'Dir'),
'Dirs' : Variable_Method_Caller('TARGET', 'Dirs'),