diff options
author | William Blevins <wblevins@gmail.com> | 2015-05-17 23:57:44 (GMT) |
---|---|---|
committer | William Blevins <wblevins@gmail.com> | 2015-05-17 23:57:44 (GMT) |
commit | b27b2316842dfa291feef332c80f676fd097d809 (patch) | |
tree | 593e0708b52b387658a12105d39ba646be8b2671 /src/engine/SCons/Node | |
parent | 654e4414d80324b2a4c2edf3c685a38feec514f6 (diff) | |
download | SCons-b27b2316842dfa291feef332c80f676fd097d809.zip SCons-b27b2316842dfa291feef332c80f676fd097d809.tar.gz SCons-b27b2316842dfa291feef332c80f676fd097d809.tar.bz2 |
Issue 2264: Added cross-language scanner support.
Diffstat (limited to 'src/engine/SCons/Node')
-rw-r--r-- | src/engine/SCons/Node/__init__.py | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py index f2d37c2..5721442 100644 --- a/src/engine/SCons/Node/__init__.py +++ b/src/engine/SCons/Node/__init__.py @@ -916,32 +916,38 @@ class Node(object): """ return [] - def get_implicit_deps(self, env, scanner, path): + def get_implicit_deps(self, env, scanner, path, kw = {}): """Return a list of implicit dependencies for this node. This method exists to handle recursive invocation of the scanner on the implicit dependencies returned by the scanner, if the scanner's recursive flag says that we should. """ - if not scanner: - return [] - - # Give the scanner a chance to select a more specific scanner - # for this Node. - #scanner = scanner.select(self) - nodes = [self] seen = {} seen[self] = 1 deps = [] while nodes: n = nodes.pop(0) - d = [x for x in n.get_found_includes(env, scanner, path) if x not in seen] + + if not scanner: + s = n.get_env_scanner(env, kw) + if s: + s = s.select(n) + else: + s = scanner.select(n) + + if not s: + continue + + p = path(s) + + d = [x for x in n.get_found_includes(env, s, p) if x not in seen] if d: deps.extend(d) for n in d: seen[n] = 1 - nodes.extend(scanner.recurse_nodes(d)) + nodes.extend(s.recurse_nodes(d)) return deps |