3
# WARNING! Do not edit! http://waf.googlecode.com/svn/docs/wafbook/single.html#_obtaining_the_waf_file
5
from waflib import Task
6
from waflib.TaskGen import extension
7
class bison(Task.Task):
9
run_str='${BISON} ${BISONFLAGS} ${SRC[0].abspath()} -o ${TGT[0].name}'
11
def big_bison(self,node):
12
has_h='-d'in self.env['BISONFLAGS']
14
if node.name.endswith('.yc'):
15
outs.append(node.change_ext('.tab.cc'))
17
outs.append(node.change_ext('.tab.hh'))
19
outs.append(node.change_ext('.tab.c'))
21
outs.append(node.change_ext('.tab.h'))
22
tsk=self.create_task('bison',node,outs)
23
tsk.cwd=node.parent.get_bld().abspath()
24
self.source.append(outs[0])
26
conf.find_program('bison',var='BISON')
27
conf.env.BISONFLAGS=['-d']
29
extension('.y','.yc','.yy')(big_bison)
b'\\ No newline at end of file'