diff options
author | Steven Knight <knight@baldmt.com> | 2003-08-24 14:44:10 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-08-24 14:44:10 (GMT) |
commit | 852e7119fb7c6d6ccc2a4cb2c159445376b97fef (patch) | |
tree | d14db00af1a9d01734146c6e5ceceb61b83da6e0 /src/engine/SCons/Tool/sunlink.py | |
parent | 189d5b4d754cbd7eefde34aef617c4e3adcd8180 (diff) | |
download | SCons-852e7119fb7c6d6ccc2a4cb2c159445376b97fef.zip SCons-852e7119fb7c6d6ccc2a4cb2c159445376b97fef.tar.gz SCons-852e7119fb7c6d6ccc2a4cb2c159445376b97fef.tar.bz2 |
Support for additional UNIX variants: (Christian Engel)
Diffstat (limited to 'src/engine/SCons/Tool/sunlink.py')
-rw-r--r-- | src/engine/SCons/Tool/sunlink.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/engine/SCons/Tool/sunlink.py b/src/engine/SCons/Tool/sunlink.py index bc66dce..c73a309 100644 --- a/src/engine/SCons/Tool/sunlink.py +++ b/src/engine/SCons/Tool/sunlink.py @@ -32,16 +32,25 @@ selection method. __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +import os +import os.path + import link -linkers = ['CC', 'cc'] +ccLinker = None + +# search for the acc compiler and linker front end +for dir in os.listdir('/opt'): + linker = '/opt/' + dir + '/bin/CC' + if os.path.exists(linker): + ccLinker = linker + break def generate(env): """Add Builders and construction variables for Forte to an Environment.""" link.generate(env) env['SHLINKFLAGS'] = '$LINKFLAGS -G' - env['LINK'] = env.Detect(linkers) or 'cc' def exists(env): - return env.Detect(linkers) + return ccLinker |