summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node/FS.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-03-28 03:29:11 (GMT)
committerSteven Knight <knight@baldmt.com>2003-03-28 03:29:11 (GMT)
commite94e7726d2602503cd6ea7ba1acb37558821827e (patch)
tree3c312aac30b8d44b5e898a1ff9ec15b5003b98e7 /src/engine/SCons/Node/FS.py
parentf63429682eca0f75ba22c2e01f155bb8d986bd85 (diff)
downloadSCons-e94e7726d2602503cd6ea7ba1acb37558821827e.zip
SCons-e94e7726d2602503cd6ea7ba1acb37558821827e.tar.gz
SCons-e94e7726d2602503cd6ea7ba1acb37558821827e.tar.bz2
Fix erroneous dependency-cycle errors when an Alias source doesn't exist. (Anthony Roach)
Diffstat (limited to 'src/engine/SCons/Node/FS.py')
-rw-r--r--src/engine/SCons/Node/FS.py40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index d6b7b53..0afc3d8 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -892,6 +892,9 @@ class Dir(Entry):
"""Return a fixed "contents" value of a directory."""
return ''
+ def prepare(self):
+ pass
+
def current(self, calc):
"""If all of our children were up-to-date, then this
directory was up-to-date, too."""
@@ -971,7 +974,6 @@ class File(Entry):
def _morph(self):
"""Turn a file system node into a File object."""
- self.linked = 0
self.scanner_paths = {}
self.found_includes = {}
if not hasattr(self, '_local'):
@@ -1196,28 +1198,24 @@ class File(Entry):
def prepare(self):
"""Prepare for this file to be created."""
- def missing(node):
- return not node.has_builder() and not node.linked and not node.rexists() and not node.has_src_builder()
- missing_sources = filter(missing, self.children())
- if missing_sources:
- desc = "No Builder for target `%s', needed by `%s'." % (missing_sources[0], self)
- raise SCons.Errors.StopError, desc
+ SCons.Node.Node.prepare(self)
- if self.exists():
- if self.has_builder() and not self.precious:
+ if self.get_state() != SCons.Node.up_to_date:
+ if self.exists():
+ if self.has_builder() and not self.precious:
+ try:
+ Unlink(self, None, None)
+ except OSError, e:
+ raise SCons.Errors.BuildError(node = self,
+ errstr = e.strerror)
+ if hasattr(self, '_exists'):
+ delattr(self, '_exists')
+ else:
try:
- Unlink(self, None, None)
- except OSError, e:
- raise SCons.Errors.BuildError(node = self,
- errstr = e.strerror)
- if hasattr(self, '_exists'):
- delattr(self, '_exists')
- else:
- try:
- self._createDir()
- except SCons.Errors.StopError, drive:
- desc = "No drive `%s' for target `%s'." % (drive, self)
- raise SCons.Errors.StopError, desc
+ self._createDir()
+ except SCons.Errors.StopError, drive:
+ desc = "No drive `%s' for target `%s'." % (drive, self)
+ raise SCons.Errors.StopError, desc
def remove(self):
"""Remove this file."""