summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-05-27 12:14:50 (GMT)
committerSteven Knight <knight@baldmt.com>2003-05-27 12:14:50 (GMT)
commiteb18e3716f7c5de0d9bc1399d4e4f4e4c587388a (patch)
tree5f9535a11da29058da2460e1aebd97efff9c6bda /test
parentdd46e3d77cb07573d2ff1cb0caed60e5f474cc3c (diff)
downloadSCons-eb18e3716f7c5de0d9bc1399d4e4f4e4c587388a.zip
SCons-eb18e3716f7c5de0d9bc1399d4e4f4e4c587388a.tar.gz
SCons-eb18e3716f7c5de0d9bc1399d4e4f4e4c587388a.tar.bz2
Use -lfrtbegin when linking fortran in gcc3; Cygwin fixes. (Chad Austin)
Diffstat (limited to 'test')
-rw-r--r--test/BuildDir.py18
-rw-r--r--test/CVS.py2
-rw-r--r--test/F77.py2
-rw-r--r--test/F77FLAGS.py2
-rw-r--r--test/F77PATH.py16
-rw-r--r--test/SHF77FLAGS.py2
-rw-r--r--test/scan-once.py3
7 files changed, 17 insertions, 28 deletions
diff --git a/test/BuildDir.py b/test/BuildDir.py
index 9c37f2c..f38505e 100644
--- a/test/BuildDir.py
+++ b/test/BuildDir.py
@@ -30,10 +30,8 @@ import sys
import time
import TestSCons
-if sys.platform == 'win32':
- _exe = '.exe'
-else:
- _exe = ''
+_exe = TestSCons._exe
+fortran_runtime = TestSCons.fortran_lib
test = TestSCons.TestSCons()
@@ -92,14 +90,6 @@ SConscript('../build/var5/SConscript', "env")
SConscript('../build/var6/SConscript', "env")
""")
-if string.find(sys.platform, 'irix') != -1:
- fortran_runtime = 'ftn'
-
- # f77 does NOT work on cruncher
- test.no_result()
-else:
- fortran_runtime = 'g2c'
-
test.subdir(['work1', 'src'])
test.write(['work1', 'src', 'SConscript'], """
import os
@@ -133,8 +123,8 @@ except:
if f77 and env.Detect(env['F77']):
env.Command(target='b2.f', source='b2.in', action=buildIt)
- env.Copy(LIBS = [r'%s']).Program(target='bar2', source='b2.f')
- env.Copy(LIBS = [r'%s']).Program(target='bar1', source='b1.f')
+ env.Copy(LIBS = %s).Program(target='bar2', source='b2.f')
+ env.Copy(LIBS = %s).Program(target='bar1', source='b1.f')
""" % (fortran_runtime, fortran_runtime))
test.write(['work1', 'src', 'f1.c'], r"""
diff --git a/test/CVS.py b/test/CVS.py
index 33fbe0f..1ce28d6 100644
--- a/test/CVS.py
+++ b/test/CVS.py
@@ -235,7 +235,7 @@ test.subdir(['work3'])
test.write(['work3', 'SConstruct'], """\
import os
env = Environment(ENV = { 'PATH' : os.environ['PATH'] })
-env.SourceCode('.', env.CVS(':pserver:anonymous:@cvs.sourceforge.net:/cvsroot/scons'))
+env.SourceCode('.', env.CVS(':pserver:anonymous@cvs.sourceforge.net:/cvsroot/scons'))
env.Install('install', 'scons/SConstruct')
""")
diff --git a/test/F77.py b/test/F77.py
index b4ef9bf..94c7c77 100644
--- a/test/F77.py
+++ b/test/F77.py
@@ -158,7 +158,7 @@ os.system(string.join(sys.argv[1:], " "))
""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\'))
test.write('SConstruct', """
-foo = Environment(LIBS = r'%s')
+foo = Environment(LIBS = %s)
f77 = foo.Dictionary('F77')
bar = foo.Copy(F77 = r'%s wrapper.py ' + f77)
foo.Program(target = 'foo', source = 'foo.f')
diff --git a/test/F77FLAGS.py b/test/F77FLAGS.py
index 6b9253b..027a02f 100644
--- a/test/F77FLAGS.py
+++ b/test/F77FLAGS.py
@@ -161,7 +161,7 @@ os.system(string.join(sys.argv[1:], " "))
""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\'))
test.write('SConstruct', """
-foo = Environment(LIBS = r'%s')
+foo = Environment(LIBS = %s)
f77 = foo.Dictionary('F77')
bar = foo.Copy(F77 = r'%s wrapper.py ' + f77, F77FLAGS = '-Ix')
foo.Program(target = 'foo', source = 'foo.f')
diff --git a/test/F77PATH.py b/test/F77PATH.py
index f3dd483..af3a9c9 100644
--- a/test/F77PATH.py
+++ b/test/F77PATH.py
@@ -28,11 +28,7 @@ import os
import sys
import TestSCons
-if sys.platform == 'win32':
- _exe = '.exe'
-else:
- _exe = ''
-
+_exe = TestSCons._exe
FTN_LIB = TestSCons.fortran_lib
prog = 'prog' + _exe
@@ -49,14 +45,14 @@ if not test.detect('F77', 'g77'):
test.subdir('include', 'subdir', ['subdir', 'include'], 'inc2')
test.write('SConstruct', """
-env = Environment(F77PATH = ['$FOO'], LIBS = r'%s', FOO='include')
+env = Environment(F77PATH = ['$FOO'], LIBS = %s, FOO='include')
obj = env.Object(target='foobar/prog', source='subdir/prog.f')
env.Program(target='prog', source=obj)
SConscript('subdir/SConscript', "env")
BuildDir('variant', 'subdir', 0)
include = Dir('include')
-env = Environment(F77PATH=[include], LIBS = r'%s')
+env = Environment(F77PATH=[include], LIBS = %s)
SConscript('variant/SConscript', "env")
""" % (FTN_LIB, FTN_LIB))
@@ -161,14 +157,14 @@ test.up_to_date(arguments = args)
# Change F77PATH and make sure we don't rebuild because of it.
test.write('SConstruct', """
-env = Environment(F77PATH = Split('inc2 include'), LIBS = r'%s')
+env = Environment(F77PATH = Split('inc2 include'), LIBS = %s)
obj = env.Object(target='foobar/prog', source='subdir/prog.f')
env.Program(target='prog', source=obj)
SConscript('subdir/SConscript', "env")
BuildDir('variant', 'subdir', 0)
include = Dir('include')
-env = Environment(F77PATH=['inc2', include], LIBS = r'%s')
+env = Environment(F77PATH=['inc2', include], LIBS = %s)
SConscript('variant/SConscript', "env")
""" % (FTN_LIB, FTN_LIB))
@@ -196,7 +192,7 @@ test.up_to_date(arguments = args)
# Check that a null-string F77PATH doesn't blow up.
test.write('SConstruct', """
-env = Environment(F77PATH = '', LIBS = r'%s')
+env = Environment(F77PATH = '', LIBS = %s)
env.Library('foo', source = 'empty.f')
""" % FTN_LIB)
diff --git a/test/SHF77FLAGS.py b/test/SHF77FLAGS.py
index 27c6603..261f638 100644
--- a/test/SHF77FLAGS.py
+++ b/test/SHF77FLAGS.py
@@ -127,7 +127,7 @@ os.system(string.join(sys.argv[1:], " "))
""" % string.replace(test.workpath('wrapper.out'), '\\', '\\\\'))
test.write('SConstruct', """
-foo = Environment(LIBS = r'%s')
+foo = Environment(LIBS = %s)
shf77 = foo.Dictionary('SHF77')
bar = foo.Copy(SHF77 = r'%s wrapper.py ' + shf77, SHF77FLAGS = '-Ix')
foo.SharedLibrary(target = 'foo/foo', source = 'foo.f')
diff --git a/test/scan-once.py b/test/scan-once.py
index f629db6..ea4dbee 100644
--- a/test/scan-once.py
+++ b/test/scan-once.py
@@ -303,6 +303,9 @@ import re
for k in fromdict.keys():
if k != "ENV" and k != "SCANNERS" and k != "CFLAGS" and k != "CXXFLAGS" \
and not SCons.Util.is_Dict(fromdict[k]):
+ # the next line fails in Cygwin because it tries to do env.subst on
+ # $RMIC $RMICFLAGS -d ${TARGET.attributes.java_lookupdir} ...
+ # when $TARGET is None, so $TARGET.attributes throws an exception
todict[k] = env.subst(str(fromdict[k]))
todict["CFLAGS"] = fromdict["CPPFLAGS"] + " " + \
string.join(map(lambda x: "-I" + x, env["CPPPATH"])) + " " + \