From 6665a6ebdd30da7543cd8868618132ee601ce88f Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sun, 29 May 2016 14:11:05 +0200 Subject: [PATCH] Update waflib/extras/stale.py --- waflib/extras/stale.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/waflib/extras/stale.py b/waflib/extras/stale.py index 9e48d0a1..cac3f469 100644 --- a/waflib/extras/stale.py +++ b/waflib/extras/stale.py @@ -13,6 +13,8 @@ a full 'waf clean' Of course, it will only work if there are no dynamically generated nodes/tasks, in which case the method will have to be modified to exclude some folders for example. + +Make sure to set bld.post_mode = waflib.Build.POST_AT_ONCE """ from waflib import Logs, Build @@ -73,21 +75,20 @@ def refill_task_list(self): self.stale_done = True # this does not work in partial builds - if hasattr(bld, 'options') and bld.options.targets and bld.options.targets != '*': + if bld.targets != '*': return iit # this does not work in dynamic builds - if not hasattr(bld, 'post_mode') or bld.post_mode == Build.POST_LAZY: + if getattr(bld, 'post_mode') == Build.POST_AT_ONCE: return iit # obtain the nodes to use during the build nodes = [] - for i in range(len(bld.groups)): - tasks = bld.get_tasks_group(i) + for tasks in bld.groups: for x in tasks: try: nodes.extend(x.outputs) - except: + except AttributeError: pass stale_rec(bld.bldnode, nodes)