summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-10-09 20:12:00 (GMT)
committerSteven Knight <knight@baldmt.com>2002-10-09 20:12:00 (GMT)
commit16883a48bcbed63c40382dfa94d352c0fecfe0de (patch)
tree0723139fb7516601af23d5229174e99a48e91816
parentbbdf3e20a90dabfe9944bfc58e6756cf799df7e9 (diff)
downloadSCons-16883a48bcbed63c40382dfa94d352c0fecfe0de.zip
SCons-16883a48bcbed63c40382dfa94d352c0fecfe0de.tar.gz
SCons-16883a48bcbed63c40382dfa94d352c0fecfe0de.tar.bz2
Fix dependency scanning when overriding LIBS (Anthony Roach)
-rw-r--r--src/CHANGES.txt2
-rw-r--r--src/engine/SCons/Node/__init__.py4
-rw-r--r--test/LIBS.py25
3 files changed, 29 insertions, 2 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index bda8903..8d6bad5 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -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
diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py
index c67ed92..75a27c0 100644
--- a/src/engine/SCons/Node/__init__.py
+++ b/src/engine/SCons/Node/__init__.py
@@ -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))
diff --git a/test/LIBS.py b/test/LIBS.py
index b9fb275..22bf3f1 100644
--- a/test/LIBS.py
+++ b/test/LIBS.py
@@ -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()