mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-29 13:30:32 +01:00
40 lines
944 B
Python
40 lines
944 B
Python
#! /usr/bin/env python
|
|
|
|
"""
|
|
A build iterator similar to "waf step" but following the dependencies of input/output files
|
|
|
|
waf make --files=aa
|
|
waf clean make --files=cc
|
|
"""
|
|
|
|
top = '.'
|
|
out = 'build'
|
|
|
|
def options(opt):
|
|
opt.load('make')
|
|
|
|
def configure(conf):
|
|
conf.load('make')
|
|
|
|
def build(bld):
|
|
|
|
x = bld.path.make_node('wscript')
|
|
|
|
def xxx(**kw):
|
|
# this is just an alias, but aliases are convenient, use them!
|
|
kw['update_outputs'] = True
|
|
if not 'rule' in kw:
|
|
kw['rule'] = 'cp ${SRC} ${TGT}'
|
|
return bld(**kw)
|
|
|
|
xxx(source=x, target=x.change_ext('.a'), name='a')
|
|
xxx(source=x.change_ext('.a'), target=x.change_ext('.aa'), name='aa')
|
|
|
|
xxx(source=x, target=x.change_ext('.b'), name='b')
|
|
xxx(source=x.change_ext('.b'), target=x.change_ext('.bb'), name='bb')
|
|
|
|
xxx(source=x, target=x.change_ext('.c'), name='c')
|
|
|
|
xxx(rule='cat ${SRC} > ${TGT}', source=[x.change_ext('.bb'), x.change_ext('.aa')], target=[x.change_ext('.cc')], name='cc')
|
|
|