diff options
author | Steven Knight <knight@baldmt.com> | 2002-05-02 12:16:24 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-05-02 12:16:24 (GMT) |
commit | 14b0749ef9a6232ad1375f750baf00e0fea14e56 (patch) | |
tree | d8ee5ca620e66bb2cd782cb22bbc7cca0731a09d /test | |
parent | 35a9fe7b3a3575367b74fbaf84f5336ee4ca5573 (diff) | |
download | SCons-14b0749ef9a6232ad1375f750baf00e0fea14e56.zip SCons-14b0749ef9a6232ad1375f750baf00e0fea14e56.tar.gz SCons-14b0749ef9a6232ad1375f750baf00e0fea14e56.tar.bz2 |
Fix for long-line LINKCOM signatures on WIN32; add a for_signature argument to command generators. (Charles Crain)
Diffstat (limited to 'test')
-rw-r--r-- | test/CommandGenerator.py | 2 | ||||
-rw-r--r-- | test/long-lines.py | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/test/CommandGenerator.py b/test/CommandGenerator.py index a85b07a..9a2a7c7 100644 --- a/test/CommandGenerator.py +++ b/test/CommandGenerator.py @@ -42,7 +42,7 @@ sys.exit(0) """) test.write('SConstruct', """ -def g(source, target, env): +def g(source, target, for_signature, env): import sys python = sys.executable return [[python, "build.py", "$TEMPFILE"] + source, diff --git a/test/long-lines.py b/test/long-lines.py index 9cf24d8..521ed2c 100644 --- a/test/long-lines.py +++ b/test/long-lines.py @@ -35,10 +35,12 @@ test = TestSCons.TestSCons() if sys.platform == 'win32': lib_='' _dll = '.dll' + _export = '__declspec(dllexport) ' linkflag = '/LIBPATH:' + test.workpath() else: lib_='lib' _dll='.so' + _export='' linkflag = '-L' + test.workpath() test.write('SConstruct', """ @@ -52,6 +54,8 @@ env.Library(target = 'bar', source = 'foo.c', shared=1) """ % (linkflag, linkflag)) test.write('foo.c', r""" +%svoid foo() { } + int main(int argc, char *argv[]) { @@ -59,10 +63,12 @@ main(int argc, char *argv[]) printf("foo.c\n"); exit (0); } -""") +""" % _export) test.run(arguments = '.') +test.up_to_date(arguments = '.') + test.run(program = test.workpath('foo'), stdout = "foo.c\n") test.fail_test(not os.path.exists(lib_+'bar'+_dll)) |