summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node/FS.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-10-21 12:07:26 (GMT)
committerSteven Knight <knight@baldmt.com>2004-10-21 12:07:26 (GMT)
commitc9c69b3bd0dd817e589efcc83643e45071d2a95c (patch)
tree803f5bc5122b2a22d15f8375bab9361164487a6c /src/engine/SCons/Node/FS.py
parent3e52ca38ff11bf7515dbeb05af362f370479bfb4 (diff)
downloadSCons-c9c69b3bd0dd817e589efcc83643e45071d2a95c.zip
SCons-c9c69b3bd0dd817e589efcc83643e45071d2a95c.tar.gz
SCons-c9c69b3bd0dd817e589efcc83643e45071d2a95c.tar.bz2
Handle use of Mkdir() when the file exists.
Diffstat (limited to 'src/engine/SCons/Node/FS.py')
-rw-r--r--src/engine/SCons/Node/FS.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index 883b82c..1e24be0 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -1507,7 +1507,7 @@ class File(Base):
return includes
- def _createDir(self):
+ def _createDir(self, update=None):
# ensure that the directories for this node are
# created.
@@ -1529,6 +1529,11 @@ 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()
# 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
@@ -1667,7 +1672,7 @@ class File(Base):
pass
else:
try:
- self._createDir()
+ self._createDir(update=1)
except SCons.Errors.StopError, drive:
desc = "No drive `%s' for target `%s'." % (drive, self)
raise SCons.Errors.StopError, desc