mirror of
https://gitlab.com/ita1024/waf.git
synced 2025-01-06 00:15:30 +01:00
Update waflib/extras/stale.py
This commit is contained in:
parent
02a8361149
commit
6665a6ebdd
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user