From 73e3cc7ebfa6f59f810ce0e02de501a7ad5218da Mon Sep 17 00:00:00 2001 From: stevenknight Date: Wed, 24 Apr 2002 16:47:04 +0000 Subject: [PATCH] Fix for relative CPPPATH directories in subsidiary SConscript files. (Charles Crain) git-svn-id: http://scons.tigris.org/svn/scons/trunk@348 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/CHANGES.txt | 3 +++ src/engine/SCons/Node/__init__.py | 4 ++-- test/CPPPATH.py | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index ce105114..67a05744 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -69,6 +69,9 @@ RELEASE 0.07 - - Make top-relative '#/dir' lookups work like '#dir'. + - Fix for relative CPPPATH directories in subsidiary SConscript files + (broken in 0.06). + From Steven Knight: - Fix so that -c -n does *not* remove the targets! diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py index db52b3ee..68e4c732 100644 --- a/src/engine/SCons/Node/__init__.py +++ b/src/engine/SCons/Node/__init__.py @@ -88,8 +88,8 @@ class Node: def generate_build_args(self): dict = copy.copy(self.env.Dictionary()) - if hasattr(self, 'dir'): - auto = self.env.autogenerate(dir = self.dir) + if hasattr(self, 'cwd'): + auto = self.env.autogenerate(dir = self.cwd) else: auto = self.env.autogenerate() dict.update(auto) diff --git a/test/CPPPATH.py b/test/CPPPATH.py index 958cc685..d09ecb8c 100644 --- a/test/CPPPATH.py +++ b/test/CPPPATH.py @@ -45,7 +45,7 @@ test.subdir('include', 'subdir', ['subdir', 'include'], 'inc2') test.write('SConstruct', """ env = Environment(CPPPATH = ['include']) -obj = env.Object(target='prog', source='subdir/prog.c') +obj = env.Object(target='foobar/prog', source='subdir/prog.c') env.Program(target='prog', source=obj) SConscript('subdir/SConscript', "env") @@ -164,7 +164,7 @@ test.up_to_date(arguments = args) # Change CPPPATH and make sure we don't rebuild because of it. test.write('SConstruct', """ env = Environment(CPPPATH = 'inc2 include') -obj = env.Object(target='prog', source='subdir/prog.c') +obj = env.Object(target='foobar/prog', source='subdir/prog.c') env.Program(target='prog', source=obj) SConscript('subdir/SConscript', "env") -- 2.26.2