mirror of https://gitlab.com/ita1024/waf.git
Extract Build.inst.run_now
This commit is contained in:
parent
20b62a4eea
commit
9991004343
|
@ -933,11 +933,7 @@ def add_install_tasks(self):
|
||||||
tsk.set_outputs(outputs)
|
tsk.set_outputs(outputs)
|
||||||
|
|
||||||
if not getattr(self, 'postpone', True):
|
if not getattr(self, 'postpone', True):
|
||||||
status = self.install_task.runnable_status()
|
tsk.run_now()
|
||||||
if status not in (Task.RUN_ME, Task.SKIP_ME):
|
|
||||||
raise Errors.WafError('Could not process %r (not ready %r)' % (self.install_task, status))
|
|
||||||
self.install_task.run()
|
|
||||||
self.install_task.hasrun = Task.SUCCESS
|
|
||||||
|
|
||||||
class inst(Task.Task):
|
class inst(Task.Task):
|
||||||
color = 'CYAN'
|
color = 'CYAN'
|
||||||
|
@ -1001,6 +997,14 @@ class inst(Task.Task):
|
||||||
for x, y in zip(self.inputs, self.outputs):
|
for x, y in zip(self.inputs, self.outputs):
|
||||||
fun(x.abspath(), y.abspath(), x.path_from(launch_node))
|
fun(x.abspath(), y.abspath(), x.path_from(launch_node))
|
||||||
|
|
||||||
|
def run_now(self):
|
||||||
|
"""Try executing the installation task right now"""
|
||||||
|
status = self.runnable_status()
|
||||||
|
if status not in (Task.RUN_ME, Task.SKIP_ME):
|
||||||
|
raise Errors.TaskNotReady('Could not process %r: status %r' % (self, status))
|
||||||
|
self.run()
|
||||||
|
self.hasrun = Task.SUCCESS
|
||||||
|
|
||||||
def do_install(self, src, tgt, lbl, **kw):
|
def do_install(self, src, tgt, lbl, **kw):
|
||||||
"""
|
"""
|
||||||
Copy a file from src to tgt with given file permissions. The actual copy is not performed
|
Copy a file from src to tgt with given file permissions. The actual copy is not performed
|
||||||
|
|
Loading…
Reference in New Issue