Restore .sconsign file tracking back to a single global list, not directory-specific...
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 20 May 2003 02:30:01 +0000 (02:30 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 20 May 2003 02:30:01 +0000 (02:30 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@689 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Node/FS.py
src/engine/SCons/Sig/__init__.py

index c226504c9dbf01001053eabc13685ab94f3394bc..4a633c9e92736c04e98fac4376d01daa0bc5b0f5 100644 (file)
@@ -1043,7 +1043,7 @@ class Dir(Entry):
         creating it first if necessary."""
         if not self._sconsign:
             import SCons.Sig
-            self._sconsign = SCons.Sig.SConsignFileFactory(self)
+            self._sconsign = SCons.Sig.SConsignFile(self)
         return self._sconsign
 
     def srcnode(self):
index 1832e895c5a53f51f8bd8929edeb6956258b0909..6f830b6497b198a6dfe21d48c5a52a8fa84b046d 100644 (file)
@@ -47,7 +47,7 @@ except ImportError:
 default_max_drift = 2*24*60*60
 
 #XXX Get rid of the global array so this becomes re-entrant.
-sig_files = {}
+sig_files = []
 
 # 1 means use build signature for derived source files
 # 0 means use content signature for derived source files
@@ -55,18 +55,10 @@ build_signature = 1
 
 def write():
     global sig_files
-    for sig_file in sig_files.values():
+    for sig_file in sig_files:
         sig_file.write()
 
 
-def SConsignFileFactory( dir, module=None):
-    try:
-        return sig_files[dir.path]
-    except KeyError:
-        sig_files[dir.path] = SConsignFile(dir, module)
-        return sig_files[dir.path]
-
-
 class SConsignEntry:
 
     """Objects of this type are pickled to the .sconsign file, so it
@@ -118,6 +110,8 @@ class SConsignFile:
             except:
                 SCons.Warnings.warn(SCons.Warnings.CorruptSConsignWarning,
                                     "Ignoring corrupt .sconsign file: %s"%self.sconsign)
+        global sig_files
+        sig_files.append(self)
 
     def get(self, filename):
         """