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.
25 lines
526 B
Python
25 lines
526 B
Python
#! /usr/bin/env python
|
|
|
|
"""
|
|
The variable conf.env.TOUCH (set by conf.find_program) is re-used during the build
|
|
|
|
Try:
|
|
$ waf configure clean build
|
|
"""
|
|
|
|
top = '.'
|
|
out = 'build'
|
|
|
|
def options(ctx):
|
|
ctx.add_option('--foo', action='store', default=False, help='Silly test')
|
|
|
|
def configure(ctx):
|
|
ctx.env.FOO = ctx.options.foo
|
|
ctx.find_program('touch', var='TOUCH', mandatory=True) # a configuration helper
|
|
|
|
def build(ctx):
|
|
print(ctx.env.TOUCH)
|
|
print(ctx.env.FOO)
|
|
ctx(rule='${TOUCH} ${TGT}', target='bar.txt')
|
|
|