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.
24 lines
557 B
Python
24 lines
557 B
Python
#! /usr/bin/env python
|
|
# encoding: utf-8
|
|
|
|
"""
|
|
The attribute run_str is assumed to be a string and will be compiled into
|
|
a method 'run' by a metaclass (that is, when the class is defined)
|
|
"""
|
|
|
|
def configure(ctx):
|
|
ctx.env.COPY = '/bin/cp'
|
|
ctx.env.COPYFLAGS = ['-f']
|
|
|
|
def build(ctx):
|
|
from waflib.Task import Task
|
|
class copy(Task):
|
|
run_str = '${COPY} ${COPYFLAGS} ${SRC} ${TGT}'
|
|
print(copy.vars)
|
|
|
|
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)
|
|
|