diff options
| author | Gary Oberbrunner <garyo@oberbrunner.com> | 2013-11-02 21:34:02 (GMT) |
|---|---|---|
| committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2013-11-02 21:34:02 (GMT) |
| commit | 540f32bcd903747165947dd998f5c8e426bd9d69 (patch) | |
| tree | 59a41e432d00e7f454e9996aa77b8cf94f714b67 /src/engine/SCons/CacheDir.py | |
| parent | cc202cdc15cd156c458ad9a2f94b2e9145be3ec2 (diff) | |
| parent | 7fdab2a7cae767172f4dcea67c3ab4d1a37926e2 (diff) | |
| download | SCons-540f32bcd903747165947dd998f5c8e426bd9d69.zip SCons-540f32bcd903747165947dd998f5c8e426bd9d69.tar.gz SCons-540f32bcd903747165947dd998f5c8e426bd9d69.tar.bz2 | |
Merge pull request #88 (for real this time). Prev commit was actually #87.
* Allow multiple options to be specified with --debug=a,b,c
* Add support for a readonly cache (--cache-readonly)
* Always print stats if requested
* Generally try harder to print out a message on build errors
Diffstat (limited to 'src/engine/SCons/CacheDir.py')
| -rw-r--r-- | src/engine/SCons/CacheDir.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/engine/SCons/CacheDir.py b/src/engine/SCons/CacheDir.py index 3516018..9dd18e5 100644 --- a/src/engine/SCons/CacheDir.py +++ b/src/engine/SCons/CacheDir.py @@ -37,6 +37,7 @@ cache_enabled = True cache_debug = False cache_force = False cache_show = False +cache_readonly = False def CacheRetrieveFunc(target, source, env): t = target[0] @@ -70,6 +71,8 @@ CacheRetrieve = SCons.Action.Action(CacheRetrieveFunc, CacheRetrieveString) CacheRetrieveSilent = SCons.Action.Action(CacheRetrieveFunc, None) def CachePushFunc(target, source, env): + if cache_readonly: return + t = target[0] if t.nocache: return @@ -150,6 +153,9 @@ class CacheDir(object): def is_enabled(self): return (cache_enabled and not self.path is None) + def is_readonly(self): + return cache_readonly + def cachepath(self, node): """ """ @@ -201,7 +207,7 @@ class CacheDir(object): return False def push(self, node): - if not self.is_enabled(): + if self.is_readonly() or not self.is_enabled(): return return CachePush(node, [], node.get_build_env()) |
