Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 42620103d8ee8a2d972d3103bad0ab73 > files > 244

waf-1.5.19-1.fc14.noarch.rpm

#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2008 (ita)

VERSION='0.0.1'
APPNAME='simple_tool'
top = '.'
out = 'build'

import TaskGen
TaskGen.declare_chain(
	name = 'a',
	action = '${COPY} ${SRC} ${TGT}',
	ext_in = '.input',
	ext_out = '.a',
)

TaskGen.declare_chain(
	name = 'b',
	action = '${COPY} ${SRC} ${TGT}',
	ext_in = '.a',
	ext_out = '.b',
)

# an example of a scanner used with chains of transformations
def scan(self):
	w = self.inputs[0].parent.find_resource('wscript')
	return ([w], [])

TaskGen.declare_chain(
	name = 'c',
	action = '${COPY} ${SRC} ${TGT}',
	ext_in = '.b',
	ext_out = '.c',
	scan = scan,
	reentrant = 0 # <<- this means the files produced are not reinjected as sources
)

def set_options(opt):
	pass

def configure(conf):
	import os
	conf.env.COPY = os.getcwd() + os.sep + "cp.py"

def build(bld):
	bld(source='uh.input')