From 4f650a2d0d6c402824f8f92877873f412ec7d641 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Tue, 20 May 2003 13:22:41 +0000 Subject: [PATCH] Put LinkFunc() back to the way it was. (Christoph Wiedemann) git-svn-id: http://scons.tigris.org/svn/scons/trunk@691 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Node/FS.py | 4 ++-- 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 4a633c9e..c2d001e8 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 25bbd257..9c37f2ca 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() + -- 2.26.2