summaryrefslogtreecommitdiff
path: root/engine/SCons/Tool/FortranCommon.py
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2010-06-15 09:21:32 +0000
committerLuca Falavigna <dktrkranz@debian.org>2010-06-15 09:21:32 +0000
commit07fc59e19636a4fc97a18b2038f3fe1c72a94000 (patch)
tree79d4a6239d81b2ccb4752d4f5ca25e0a7d3b4d4b /engine/SCons/Tool/FortranCommon.py
parent7f642861f3946d4241cbd668de258293ba92767a (diff)
parent340d57481935334465037d97c0db1555b70c0eb1 (diff)
Merge commit 'upstream/2.0.0'
Diffstat (limited to 'engine/SCons/Tool/FortranCommon.py')
-rw-r--r--engine/SCons/Tool/FortranCommon.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/engine/SCons/Tool/FortranCommon.py b/engine/SCons/Tool/FortranCommon.py
index 53c48e4..db89f96 100644
--- a/engine/SCons/Tool/FortranCommon.py
+++ b/engine/SCons/Tool/FortranCommon.py
@@ -27,10 +27,9 @@ Stuff for processing Fortran, common to all fortran dialects.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/FortranCommon.py 4720 2010/03/24 03:14:11 jars"
+__revision__ = "src/engine/SCons/Tool/FortranCommon.py 5023 2010/06/14 22:05:46 scons"
import re
-import string
import os.path
import SCons.Action
@@ -73,7 +72,7 @@ def _fortranEmitter(target, source, env):
# Convert module name to a .mod filename
suffix = env.subst('$FORTRANMODSUFFIX', target=target, source=source)
moddir = env.subst('$FORTRANMODDIR', target=target, source=source)
- modules = map(lambda x, s=suffix: string.lower(x) + s, modules)
+ modules = [x.lower() + suffix for x in modules]
for m in modules:
target.append(env.fs.File(m, moddir))
return (target, source)
@@ -91,8 +90,8 @@ def ComputeFortranSuffixes(suffixes, ppsuffixes):
pre-processed. Both should be sequences, not strings."""
assert len(suffixes) > 0
s = suffixes[0]
- sup = string.upper(s)
- upper_suffixes = map(string.upper, suffixes)
+ sup = s.upper()
+ upper_suffixes = [_.upper() for _ in suffixes]
if SCons.Util.case_sensitive_suffixes(s, sup):
ppsuffixes.extend(upper_suffixes)
else:
@@ -135,17 +134,17 @@ def DialectAddToEnv(env, dialect, suffixes, ppsuffixes, support_module = 0):
static_obj.add_emitter(suffix, FortranEmitter)
shared_obj.add_emitter(suffix, ShFortranEmitter)
- if not env.has_key('%sFLAGS' % dialect):
+ if '%sFLAGS' % dialect not in env:
env['%sFLAGS' % dialect] = SCons.Util.CLVar('')
- if not env.has_key('SH%sFLAGS' % dialect):
+ if 'SH%sFLAGS' % dialect not in env:
env['SH%sFLAGS' % dialect] = SCons.Util.CLVar('$%sFLAGS' % dialect)
# If a tool does not define fortran prefix/suffix for include path, use C ones
- if not env.has_key('INC%sPREFIX' % dialect):
+ if 'INC%sPREFIX' % dialect not in env:
env['INC%sPREFIX' % dialect] = '$INCPREFIX'
- if not env.has_key('INC%sSUFFIX' % dialect):
+ if 'INC%sSUFFIX' % dialect not in env:
env['INC%sSUFFIX' % dialect] = '$INCSUFFIX'
env['_%sINCFLAGS' % dialect] = '$( ${_concat(INC%sPREFIX, %sPATH, INC%sSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)' % (dialect, dialect, dialect)