diff options
| author | Steven Knight <knight@baldmt.com> | 2005-12-27 22:24:55 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2005-12-27 22:24:55 (GMT) |
| commit | b03e7ab4ca681e521249cfed7a727299c76378db (patch) | |
| tree | acaae981ff2f6ce27cbf760c83b113f76129705e /src/engine/SCons/Node/FS.py | |
| parent | 0859903f99927abc0383b2e642d060604d5f9695 (diff) | |
| download | SCons-b03e7ab4ca681e521249cfed7a727299c76378db.zip SCons-b03e7ab4ca681e521249cfed7a727299c76378db.tar.gz SCons-b03e7ab4ca681e521249cfed7a727299c76378db.tar.bz2 | |
Handle scanning of the in-memory entries for a Dir with a scanner, not a hard-coded Python method.
Diffstat (limited to 'src/engine/SCons/Node/FS.py')
| -rw-r--r-- | src/engine/SCons/Node/FS.py | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 59ad707..69936d2 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -198,12 +198,14 @@ def get_MkdirBuilder(): global MkdirBuilder if MkdirBuilder is None: import SCons.Builder + import SCons.Defaults # "env" will get filled in by Executor.get_build_env() # calling SCons.Defaults.DefaultEnvironment() when necessary. MkdirBuilder = SCons.Builder.Builder(action = Mkdir, env = None, explain = None, is_explicit = None, + target_scanner = SCons.Defaults.DirEntryScanner, name = "MkdirBuilder") return MkdirBuilder @@ -1287,21 +1289,11 @@ class Dir(Base): return string.join(path_elems, os.sep) - def scan(self): - if not self.implicit is None: - return - self.implicit = [] - self.implicit_dict = {} - self._children_reset() + def get_env_scanner(self, env, kw={}): + return SCons.Defaults.DirEntryScanner - dont_scan = lambda k: k not in ['.', '..', '.sconsign'] - deps = filter(dont_scan, self.entries.keys()) - # keys() is going to give back the entries in an internal, - # unsorted order. Sort 'em so the order is deterministic. - deps.sort() - entries = map(lambda n, e=self.entries: e[n], deps) - - self._add_child(self.implicit, self.implicit_dict, entries) + def get_target_scanner(self): + return SCons.Defaults.DirEntryScanner def get_found_includes(self, env, scanner, path): """Return the included implicit dependencies in this file. @@ -1310,7 +1302,7 @@ class Dir(Base): __cacheable__""" if not scanner: return [] - # Clear cached info for this Node. If we already visited this + # Clear cached info for this Dir. If we already visited this # directory on our walk down the tree (because we didn't know at # that point it was being used as the source for another Node) # then we may have calculated build signature before realizing |
