summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-09-16 06:39:36 (GMT)
committerSteven Knight <knight@baldmt.com>2003-09-16 06:39:36 (GMT)
commit0b3f13af1549fc4f6b6ed57f151b1d2004e82f2c (patch)
tree3d2db1cc9753bc05cc6d6a36cd10f411766cd374 /src/engine/SCons/Node
parentc41dc6daf69787a9f4d4984aec727af705445e46 (diff)
downloadSCons-0b3f13af1549fc4f6b6ed57f151b1d2004e82f2c.zip
SCons-0b3f13af1549fc4f6b6ed57f151b1d2004e82f2c.tar.gz
SCons-0b3f13af1549fc4f6b6ed57f151b1d2004e82f2c.tar.bz2
Fix dependency scans of generated files. (John Johnson)
Diffstat (limited to 'src/engine/SCons/Node')
-rw-r--r--src/engine/SCons/Node/FS.py1
-rw-r--r--src/engine/SCons/Node/__init__.py45
2 files changed, 31 insertions, 15 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index a78a2c9..0abc21b 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -924,6 +924,7 @@ class Dir(Base):
self.abspath_ = self.abspath + os.sep
self.repositories = []
self.srcdir = None
+ self.source_scanner = None
self.entries = {}
self.entries['.'] = self
diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py
index 3802aad..4dd0bd9 100644
--- a/src/engine/SCons/Node/__init__.py
+++ b/src/engine/SCons/Node/__init__.py
@@ -111,9 +111,13 @@ class Node:
self.implicit = None # implicit (scanned) dependencies (None means not scanned yet)
self.parents = {}
self.wkids = None # Kids yet to walk, when it's an array
- self.source_scanner = None # implicit scanner from scanner map
self.target_scanner = None # explicit scanner from this node's Builder
+ # If/when this attribute exists, it's an implicit scanner from
+ # the scanner map for an environment. The attribute is created
+ # when we select the scanner, a value of None means there is none.
+ #self.source_scanner = None
+
self.env = None
self.state = None
self.precious = None
@@ -197,16 +201,21 @@ class Node:
# Clear out the implicit dependency caches:
# XXX this really should somehow be made more general and put
# under the control of the scanners.
- if self.source_scanner:
- self.found_includes = {}
- self.includes = None
+ try:
+ scanner = self.source_scanner
+ except AttributeError:
+ pass
+ else:
+ if scanner:
+ self.found_includes = {}
+ self.includes = None
- def get_parents(node, parent): return node.get_parents()
- def clear_cache(node, parent):
- node.implicit = None
- node.del_bsig()
- w = Walker(self, get_parents, ignore_cycle, clear_cache)
- while w.next(): pass
+ def get_parents(node, parent): return node.get_parents()
+ def clear_cache(node, parent):
+ node.implicit = None
+ node.del_bsig()
+ w = Walker(self, get_parents, ignore_cycle, clear_cache)
+ while w.next(): pass
# clear out the content signature, since the contents of this
# node were presumably just changed:
@@ -384,11 +393,17 @@ class Node:
build_env = self.get_build_env()
for child in self.children(scan=0):
- self._add_child(self.implicit,
- self.implicit_dict,
- child.get_implicit_deps(build_env,
- child.source_scanner,
- self))
+ try:
+ scanner = child.source_scanner
+ except AttributeError:
+ pass
+ else:
+ if scanner:
+ self._add_child(self.implicit,
+ self.implicit_dict,
+ child.get_implicit_deps(build_env,
+ scanner,
+ self))
# scan this node itself for implicit dependencies
self._add_child(self.implicit,