diff options
Diffstat (limited to 'src/engine/SCons/Node/FS.py')
-rw-r--r-- | src/engine/SCons/Node/FS.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 9e0e6f6..4d269d2 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -47,6 +47,7 @@ import cStringIO import SCons.Action from SCons.Debug import logInstanceCreation import SCons.Errors +import SCons.Memoize import SCons.Node import SCons.Subst import SCons.Util @@ -249,6 +250,8 @@ CacheRetrieveSilent = SCons.Action.Action(CacheRetrieveFunc, None) def CachePushFunc(target, source, env): t = target[0] + if t.nocache: + return fs = t.fs cachedir, cachefile = t.cachepath() if fs.exists(cachefile): @@ -829,7 +832,7 @@ class Entry(Base): morph this Entry.""" try: self = self.disambiguate(must_exist=1) - except SCons.Errors.UserError, e: + except SCons.Errors.UserError: # There was nothing on disk with which to disambiguate # this entry. Leave it as an Entry, but return a null # string so calls to get_contents() in emitters and the @@ -1054,7 +1057,7 @@ class FS(LocalFS): path_norm = string.split(_my_normcase(name), os.sep) first_orig = path_orig.pop(0) # strip first element - first_norm = path_norm.pop(0) # strip first element + unused = path_norm.pop(0) # strip first element drive, path_first = os.path.splitdrive(first_orig) if path_first: @@ -1477,9 +1480,11 @@ class Dir(Base): return result def get_env_scanner(self, env, kw={}): + import SCons.Defaults return SCons.Defaults.DirEntryScanner def get_target_scanner(self): + import SCons.Defaults return SCons.Defaults.DirEntryScanner def get_found_includes(self, env, scanner, path): @@ -2033,6 +2038,8 @@ class File(Base): Returns true iff the node was successfully retrieved. """ + if self.nocache: + return None b = self.is_derived() if not b and not self.has_src_builder(): return None @@ -2298,7 +2305,7 @@ class File(Base): return str(self.rfile()) def cachepath(self): - if not self.fs.CachePath: + if self.nocache or not self.fs.CachePath: return None, None ninfo = self.get_binfo().ninfo if not hasattr(ninfo, 'bsig'): |