summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node/FS.py
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2011-03-01 01:01:47 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2011-03-01 01:01:47 (GMT)
commitefb0071db2ef9b2ef9687e1353724ed18db1ee9b (patch)
tree88104462b1961c598053143bfacb03286dcb821b /src/engine/SCons/Node/FS.py
parentf6027721b125af34862d1ba7ca5ba2205a09e1fe (diff)
downloadSCons-efb0071db2ef9b2ef9687e1353724ed18db1ee9b.zip
SCons-efb0071db2ef9b2ef9687e1353724ed18db1ee9b.tar.gz
SCons-efb0071db2ef9b2ef9687e1353724ed18db1ee9b.tar.bz2
New debug option --debug=duplicate to debug Variant-dir duplication
Diffstat (limited to 'src/engine/SCons/Node/FS.py')
-rw-r--r--src/engine/SCons/Node/FS.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index bb49f95..86649f3 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -56,6 +56,7 @@ import SCons.Warnings
from SCons.Debug import Trace
do_store_info = True
+print_duplicate = 0
class EntryProxyAttributeError(AttributeError):
@@ -2787,6 +2788,8 @@ class File(Base):
def _rmv_existing(self):
self.clear_memoized_values()
+ if print_duplicate:
+ print "dup: removing existing target %s"%self
e = Unlink(self, [], None)
if isinstance(e, SCons.Errors.BuildError):
raise e
@@ -2827,6 +2830,8 @@ class File(Base):
def do_duplicate(self, src):
self._createDir()
+ if print_duplicate:
+ print "dup: relinking variant '%s' from '%s'"%(self, src)
Unlink(self, None, None)
e = Link(self, src, None)
if isinstance(e, SCons.Errors.BuildError):
@@ -2860,6 +2865,8 @@ class File(Base):
else:
# The source file does not exist. Make sure no old
# copy remains in the variant directory.
+ if print_duplicate:
+ print "dup: no src for %s, unlinking old variant copy"%self
if Base.exists(self) or self.islink():
self.fs.unlink(self.path)
# Return None explicitly because the Base.exists() call