Fix dependency scanning when overriding LIBS (Anthony Roach)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 9 Oct 2002 20:12:00 +0000 (20:12 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 9 Oct 2002 20:12:00 +0000 (20:12 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@476 fdb21ef1-2011-0410-befe-b5e4ea1792b1

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

index bda89034ce651349f51db1f747b8ba760aea9468..8d6bad5ce9d20fd0ab36c2b0ad23b1edbbcf79aa 100644 (file)
@@ -88,6 +88,8 @@ RELEASE 0.09 -
     function to the Environment that allows people to define their
     own similar variables.
 
+  - Fix dependency scans when $LIBS is overridden.
+
   From sam th:
 
   - Dynamically check for the existence of utilities with which to
index c67ed9274aba6ff022c03163b9115ac3b01f2ce7..75a27c0620fbbeff080a8e05ceb1a9d54097e848 100644 (file)
@@ -205,13 +205,13 @@ class Node:
 
         for child in self.children(scan=0):
             self._add_child(self.implicit,
-                            child.get_implicit_deps(self.env,
+                            child.get_implicit_deps(self.generate_build_env(),
                                                     child.source_scanner,
                                                     self))
 
         # scan this node itself for implicit dependencies
         self._add_child(self.implicit,
-                        self.get_implicit_deps(self.env,
+                        self.get_implicit_deps(self.generate_build_env(),
                                                self.target_scanner,
                                                self))
 
index b9fb275a209ee9644e7ff3ba2d867ec432338a94..22bf3f19f8f6f78ee6e36ec25cf23c5594bb5c0d 100644 (file)
@@ -124,6 +124,31 @@ test.run(arguments = '.')
 
 test.run(program=foo_exe, stdout='sub1/bar.c\nsub1/baz.c\n')
 
+#
+test.write('SConstruct', """
+env = Environment()
+env.Program(target='foo', source='foo.c', LIBS=['bar', 'baz'], LIBPATH = '.')
+SConscript('sub1/SConscript', 'env')
+SConscript('sub2/SConscript', 'env')
+""")
+
+test.run(arguments = '.')
+
+test.run(program=foo_exe, stdout='sub1/bar.c\nsub1/baz.c\n')
+
+test.write(['sub1', 'baz.c'], r"""
+#include <stdio.h>
+
+void baz()
+{
+   printf("sub1/baz.c 2\n");
+}
+""")
+
+test.run(arguments = '.')
+
+test.run(program=foo_exe, stdout='sub1/bar.c\nsub1/baz.c 2\n')
+
 test.pass_test()