You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
435 B
Python
23 lines
435 B
Python
#! /usr/bin/env python
|
|
|
|
"""
|
|
Simple copy task
|
|
|
|
The attribute 'run_str' is compiled into the task method 'run' by a metaclass
|
|
"""
|
|
|
|
def configure(ctx):
|
|
pass
|
|
|
|
def build(ctx):
|
|
from waflib import Task
|
|
class copy(Task.Task):
|
|
run_str = 'cp ${SRC} ${TGT}'
|
|
copy = Task.always_run(copy)
|
|
|
|
tsk = copy(env=ctx.env)
|
|
tsk.set_inputs(ctx.path.find_resource('wscript'))
|
|
tsk.set_outputs(ctx.path.find_or_declare('b.out'))
|
|
ctx.add_to_group(tsk)
|
|
|