summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node/FS.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-10-28 12:51:44 (GMT)
committerSteven Knight <knight@baldmt.com>2001-10-28 12:51:44 (GMT)
commit3bce8a9e6e70d61723e4824bd7ba84a7b9547456 (patch)
tree27e3b6c55dd969ce1e98bf8138a8d0c9125bac59 /src/engine/SCons/Node/FS.py
parente5410ac77d8740375b43cb154bedf7219279bf67 (diff)
downloadSCons-3bce8a9e6e70d61723e4824bd7ba84a7b9547456.zip
SCons-3bce8a9e6e70d61723e4824bd7ba84a7b9547456.tar.gz
SCons-3bce8a9e6e70d61723e4824bd7ba84a7b9547456.tar.bz2
Change node and .sconsign handling to separate build and content signatures.
Diffstat (limited to 'src/engine/SCons/Node/FS.py')
-rw-r--r--src/engine/SCons/Node/FS.py40
1 files changed, 28 insertions, 12 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index cfb4142..c3566a6 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -262,9 +262,6 @@ class Entry(SCons.Node.Node):
"""A FS node's string representation is its path name."""
return self.path
- def set_signature(self, sig):
- SCons.Node.Node.set_signature(self, sig)
-
def exists(self):
return os.path.exists(self.path)
@@ -340,7 +337,11 @@ class Dir(Entry):
"""A null "builder" for directories."""
pass
- def set_signature(self, sig):
+ def set_bsig(self, bsig):
+ """A directory has no signature."""
+ pass
+
+ def set_csig(self, csig):
"""A directory has no signature."""
pass
@@ -359,11 +360,13 @@ class Dir(Entry):
return 0
def sconsign(self):
+ """Return the .sconsign file info for this directory,
+ creating it first if necessary."""
if not self._sconsign:
#XXX Rework this to get rid of the hard-coding
import SCons.Sig
import SCons.Sig.MD5
- self._sconsign = SCons.Sig.SConsignFile(self.path, SCons.Sig.MD5)
+ self._sconsign = SCons.Sig.SConsignFile(self, SCons.Sig.MD5)
return self._sconsign
@@ -408,13 +411,26 @@ class File(Entry):
else:
return 0
- def set_signature(self, sig):
- Entry.set_signature(self, sig)
- #XXX Rework this to get rid of the hard-coding
- import SCons.Sig.MD5
- self.dir.sconsign().set(self.name, self.get_timestamp(), sig, SCons.Sig.MD5)
-
- def get_oldentry(self):
+ def set_bsig(self, bsig):
+ """Set the build signature for this file, updating the
+ .sconsign entry."""
+ Entry.set_bsig(self, bsig)
+ self.set_sconsign()
+
+ def set_csig(self, csig):
+ """Set the content signature for this file, updating the
+ .sconsign entry."""
+ Entry.set_csig(self, csig)
+ self.set_sconsign()
+
+ def set_sconsign(self):
+ """Update a file's .sconsign entry with its current info."""
+ self.dir.sconsign().set(self.name, self.get_timestamp(),
+ self.get_bsig(), self.get_csig())
+
+ def get_prevsiginfo(self):
+ """Fetch the previous signature information from the
+ .sconsign entry."""
return self.dir.sconsign().get(self.name)