diff options
author | Steven Knight <knight@baldmt.com> | 2003-05-20 13:22:41 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-05-20 13:22:41 (GMT) |
commit | 52255add2e794c695db690519e96fc5def8664e3 (patch) | |
tree | 821a545cc720a6ab49f86bce5af1f9cb5aa473ec | |
parent | e3886d4e33ba4262c6a17494ca80a14f71c18971 (diff) | |
download | SCons-52255add2e794c695db690519e96fc5def8664e3.zip SCons-52255add2e794c695db690519e96fc5def8664e3.tar.gz SCons-52255add2e794c695db690519e96fc5def8664e3.tar.bz2 |
Put LinkFunc() back to the way it was. (Christoph Wiedemann)
-rw-r--r-- | src/engine/SCons/Node/FS.py | 4 | ||||
-rw-r--r-- | test/BuildDir.py | 29 |
2 files changed, 30 insertions, 3 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 4a633c9..c2d001e 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -69,8 +69,8 @@ else: _existsp = os.path.exists def LinkFunc(target, source, env): - src = str(source[0]) - dest = str(target[0]) + src = source[0].path + dest = target[0].path dir, file = os.path.split(dest) if dir and not os.path.isdir(dir): os.makedirs(dir) diff --git a/test/BuildDir.py b/test/BuildDir.py index 25bbd25..9c37f2c 100644 --- a/test/BuildDir.py +++ b/test/BuildDir.py @@ -61,7 +61,7 @@ bar42 = test.workpath('work1', 'build', 'var4', 'bar2' + _exe) bar51 = test.workpath('build', 'var5', 'bar1' + _exe) bar52 = test.workpath('build', 'var5', 'bar2' + _exe) -test.subdir('work1', 'work2') +test.subdir('work1', 'work2', 'work3') test.write(['work1', 'SConstruct'], """ src = Dir('src') @@ -348,4 +348,31 @@ test.run(chdir='work2', arguments='.') test.up_to_date(chdir='work2', arguments='.') +test.write( ['work3', 'SConstruct'], """\ +SConscriptChdir(0) +BuildDir('build', '.', duplicate=1 ) +SConscript( 'build/SConscript' ) +""") + +test.write( ['work3', 'SConscript'], """\ +import sys +headers = ['existing.h', 'non_existing.h'] +for header in headers: + h = File( header ) + contents = h.get_contents() + sys.stderr.write( '%s:%s\\n' % (header, contents)) +""") + +test.write( ['work3', 'existing.h'], """\ +/* a header file */\ +""") + +test.run(chdir='work3', + stdout=test.wrap_stdout('scons: "." is up to date.\n'), + stderr="""\ +existing.h:/* a header file */ +non_existing.h: +""") + test.pass_test() + |