diff options
| author | Steven Knight <knight@baldmt.com> | 2002-02-09 21:18:40 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2002-02-09 21:18:40 (GMT) |
| commit | 490f796a5ca21af009f406e51e751823fef8ee5c (patch) | |
| tree | d44024dbbc5a79ca57f7cae36a0350a787071c3d /src | |
| parent | be65ede5539c8911432dae9dd4a68fd483ee8549 (diff) | |
| download | SCons-490f796a5ca21af009f406e51e751823fef8ee5c.zip SCons-490f796a5ca21af009f406e51e751823fef8ee5c.tar.gz SCons-490f796a5ca21af009f406e51e751823fef8ee5c.tar.bz2 | |
Lookup implicit dependencies relative to the directory of the node in which the dependency was found.
Diffstat (limited to 'src')
| -rw-r--r-- | src/CHANGES.txt | 3 | ||||
| -rw-r--r-- | src/engine/SCons/Scanner/__init__.py | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 037db1e..7ac9979 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 a00a75b..53c67e4 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 |
