2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 09:57:15 +01:00

Unbind task.last_cmd when the command is successful

This commit is contained in:
Thomas Nagy 2016-03-06 17:23:24 +01:00
parent 0484caf3d6
commit 6768a4cb38
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64

View File

@ -59,14 +59,15 @@ def f(tsk):
def to_list(xx):
if isinstance(xx, str): return [xx]
return xx
tsk.last_cmd = lst = []
def merge(lst1, lst2):
if lst1 and lst2:
return lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]
return lst1 + lst2
lst = []
%s
if '' in lst:
lst = [x for x in lst if x]
tsk.last_cmd = lst
return tsk.exec_command(lst, cwd=cwdx, env=env.env or None)
'''
@ -633,7 +634,10 @@ class Task(TaskBase):
raise Errors.WafError(self.err_msg)
bld.node_sigs[node] = self.uid() # make sure this task produced the files in question
bld.task_sigs[self.uid()] = self.signature()
# TODO: to save some memory, unbind last_cmd here
try:
del self.last_cmd
except AttributeError:
pass
def sig_explicit_deps(self):
"""