Fix for relative CPPPATH directories in subsidiary SConscript files. (Charles Crain)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 24 Apr 2002 16:47:04 +0000 (16:47 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 24 Apr 2002 16:47:04 +0000 (16:47 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@348 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/engine/SCons/Node/__init__.py
test/CPPPATH.py

index ce1051144b45ac452feeebdbe20b030aeb0d633a..67a05744ba6c4af9c94835916bac87fe07d824d7 100644 (file)
@@ -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!
index db52b3eec9231dbce627ee7f6437b3a675aac9f8..68e4c732f8f0d977659e29aace2d941712fe609f 100644 (file)
@@ -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)
index 958cc6855b7f40e0fdcd5f5ce15a77e5ee05c377..d09ecb8c919f9be40bfbd436b19ea7adba10ae71 100644 (file)
@@ -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")