diff options
author | Steven Knight <knight@baldmt.com> | 2002-08-29 03:22:52 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-08-29 03:22:52 (GMT) |
commit | f3b80332dc469f8844e1cc619d13cb88e0432469 (patch) | |
tree | 44f04b451b61b684528189fedb27f7c23a2baaa8 /src/engine/SCons/Tool/g77.py | |
parent | 36e06c5c7557d40c4d4953e56f8c80d2a27bdd93 (diff) | |
download | SCons-f3b80332dc469f8844e1cc619d13cb88e0432469.zip SCons-f3b80332dc469f8844e1cc619d13cb88e0432469.tar.gz SCons-f3b80332dc469f8844e1cc619d13cb88e0432469.tar.bz2 |
Dynamically check for the existence of utilities. (sam th)
Diffstat (limited to 'src/engine/SCons/Tool/g77.py')
-rw-r--r-- | src/engine/SCons/Tool/g77.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/g77.py b/src/engine/SCons/Tool/g77.py index dbafcf2..1066c0f 100644 --- a/src/engine/SCons/Tool/g77.py +++ b/src/engine/SCons/Tool/g77.py @@ -37,6 +37,15 @@ import os.path import SCons.Defaults import SCons.Tool +import SCons.Util + +compilers = ['g77', 'f77'] +for i in compilers: + if SCons.Util.WhereIs(i): + compiler = i + break + compiler = None + F77Suffixes = ['.f', '.for', '.FOR'] F77PPSuffixes = ['.fpp', '.FPP'] @@ -65,3 +74,6 @@ def generate(env, platform): env['SHF77FLAGS'] = '$F77FLAGS -fPIC' env['SHF77COM'] = '$SHF77 $SHF77FLAGS $_F77INCFLAGS -c -o $TARGET $SOURCES' env['SHF77PPCOM'] = '$SHF77 $SHF77FLAGS $CPPFLAGS $_F77INCFLAGS -c -o $TARGET $SOURCES' + +def exists(): + return compiler |