diff options
| author | Steven Knight <knight@baldmt.com> | 2004-10-22 17:42:35 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2004-10-22 17:42:35 (GMT) |
| commit | 4e9fae436fc971e3cbdb19d2f0517a636bb6648b (patch) | |
| tree | dbe69fc2c04bfc72edc266322967286fe059b634 /src/engine/SCons/Node | |
| parent | eed44d1a631844c0bdaf524078a0bed587b7c965 (diff) | |
| download | SCons-4e9fae436fc971e3cbdb19d2f0517a636bb6648b.zip SCons-4e9fae436fc971e3cbdb19d2f0517a636bb6648b.tar.gz SCons-4e9fae436fc971e3cbdb19d2f0517a636bb6648b.tar.bz2 | |
Fix the execute-Mkdir-once patch so that it doesn't treat the directory as up-to-date just because it's been made, but still builds all of its children.
Diffstat (limited to 'src/engine/SCons/Node')
| -rw-r--r-- | src/engine/SCons/Node/FS.py | 25 | ||||
| -rw-r--r-- | src/engine/SCons/Node/FSTests.py | 4 |
2 files changed, 3 insertions, 26 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 1e24be0..49cbe7d 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -1111,21 +1111,6 @@ class FS(LocalFS): message = "building associated BuildDir targets: %s" % string.join(map(str, targets)) return targets, message -class DummyExecutor: - """Dummy executor class returned by Dir nodes to bamboozle SCons - into thinking we are an actual derived node, where our sources are - our directory entries.""" - def cleanup(self): - pass - def get_raw_contents(self): - return '' - def get_contents(self): - return '' - def get_timestamp(self): - return 0 - def get_build_env(self): - return None - class Dir(Base): """A class for directories in a file system. """ @@ -1507,7 +1492,7 @@ class File(Base): return includes - def _createDir(self, update=None): + def _createDir(self): # ensure that the directories for this node are # created. @@ -1529,11 +1514,7 @@ class File(Base): # directory. The dirnode.build() method will suppress # the build if it's the default builder. SCons.Node.Node.build(dirnode) - if update: - # Mark this directory as built so we don't try to build - # it again if it has an explicit user-defined Builder. - dirnode.set_state(SCons.Node.executed) - dirnode.built() + dirnode.get_executor().nullify() # The build() action may or may not have actually # created the directory, depending on whether the -n # option was used or not. Delete the _exists and @@ -1672,7 +1653,7 @@ class File(Base): pass else: try: - self._createDir(update=1) + self._createDir() except SCons.Errors.StopError, drive: desc = "No drive `%s' for target `%s'." % (drive, self) raise SCons.Errors.StopError, desc diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py index 67c4ffe..c47435f 100644 --- a/src/engine/SCons/Node/FSTests.py +++ b/src/engine/SCons/Node/FSTests.py @@ -1533,14 +1533,10 @@ class prepareTestCase(unittest.TestCase): xyz.set_state(SCons.Node.up_to_date) xyz.prepare() assert dir_made == [], dir_made - state = new_dir.get_state() - assert state != SCons.Node.executed, state xyz.set_state(0) xyz.prepare() assert dir_made[0].path == "new_dir", dir_made[0] - state = new_dir.get_state() - assert state == SCons.Node.executed, state dir = fs.Dir("dir") dir.prepare() |
