From 2ddf7a139889ae06ca9776543eb72bd04a3f78bb Mon Sep 17 00:00:00 2001 From: stevenknight Date: Sat, 9 Feb 2002 21:18:40 +0000 Subject: [PATCH] Lookup implicit dependencies relative to the directory of the node in which the dependency was found. git-svn-id: http://scons.tigris.org/svn/scons/trunk@248 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- doc/{ => design}/copyright.sgml | 0 doc/design/main.sgml | 1 + doc/python10/copyright.sgml | 32 ++++++++++++++++++++++++++++ doc/python10/main.sgml | 1 + doc/scons.mod | 4 ---- doc/user/copyright.sgml | 32 ++++++++++++++++++++++++++++ doc/user/main.sgml | 27 ++++++++++++----------- src/CHANGES.txt | 3 +++ src/engine/SCons/Scanner/__init__.py | 5 ++++- 9 files changed, 87 insertions(+), 18 deletions(-) rename doc/{ => design}/copyright.sgml (100%) create mode 100644 doc/python10/copyright.sgml create mode 100644 doc/user/copyright.sgml diff --git a/doc/copyright.sgml b/doc/design/copyright.sgml similarity index 100% rename from doc/copyright.sgml rename to doc/design/copyright.sgml diff --git a/doc/design/main.sgml b/doc/design/main.sgml index e1589b9a..3f69b2f6 100644 --- a/doc/design/main.sgml +++ b/doc/design/main.sgml @@ -34,6 +34,7 @@ + diff --git a/doc/python10/copyright.sgml b/doc/python10/copyright.sgml new file mode 100644 index 00000000..833dd80b --- /dev/null +++ b/doc/python10/copyright.sgml @@ -0,0 +1,32 @@ + + +
+ + + Copyright (c) 2001, 2002 Steven Knight + + +
diff --git a/doc/python10/main.sgml b/doc/python10/main.sgml index 5b813b20..889ef4dc 100644 --- a/doc/python10/main.sgml +++ b/doc/python10/main.sgml @@ -31,6 +31,7 @@ + diff --git a/doc/scons.mod b/doc/scons.mod index 255085c2..b156e4ce 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -8,10 +8,6 @@ - - - - + +
+ + + Copyright (c) 2002 Steven Knight + + +
diff --git a/doc/user/main.sgml b/doc/user/main.sgml index 22d977d4..4b6bbb17 100644 --- a/doc/user/main.sgml +++ b/doc/user/main.sgml @@ -32,24 +32,25 @@ %scons; - - - - - - - - - - - - + + + + + - + + + + + + + + + ]> diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 037db1e1..7ac99798 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -33,6 +33,9 @@ RELEASE 0.05 - - Allow Scanners to return a list of strings, and document how to write your own Scanners. + - Look up implicit (scanned) dependencies relative to the directory + of file being scanned. + From Anthony Roach: - Make the scons script return an error code on failures. diff --git a/src/engine/SCons/Scanner/__init__.py b/src/engine/SCons/Scanner/__init__.py index a00a75bc..53c67e40 100644 --- a/src/engine/SCons/Scanner/__init__.py +++ b/src/engine/SCons/Scanner/__init__.py @@ -109,10 +109,13 @@ class Base: list = self.function(node, env, self.argument) else: list = self.function(node, env) + kw = {} + if hasattr(node, 'dir'): + kw['directory'] = node.dir nodes = [] for l in list: if not isinstance(l, SCons.Node.FS.Entry): - l = self.node_factory(l) + l = apply(self.node_factory, (l,), kw) nodes.append(l) return nodes -- 2.26.2