diff options
Diffstat (limited to '.waf-1.7.16-0356ded4079f8d9c0828a065ed2fdab1/waflib/Tools/bison.py')
| -rw-r--r-- | .waf-1.7.16-0356ded4079f8d9c0828a065ed2fdab1/waflib/Tools/bison.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.waf-1.7.16-0356ded4079f8d9c0828a065ed2fdab1/waflib/Tools/bison.py b/.waf-1.7.16-0356ded4079f8d9c0828a065ed2fdab1/waflib/Tools/bison.py new file mode 100644 index 0000000..6ae7898 --- /dev/null +++ b/.waf-1.7.16-0356ded4079f8d9c0828a065ed2fdab1/waflib/Tools/bison.py @@ -0,0 +1,28 @@ +#! /usr/bin/env python +# encoding: utf-8 +# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file + +from waflib import Task +from waflib.TaskGen import extension +class bison(Task.Task): + color='BLUE' + run_str='${BISON} ${BISONFLAGS} ${SRC[0].abspath()} -o ${TGT[0].name}' + ext_out=['.h'] +@extension('.y','.yc','.yy') +def big_bison(self,node): + has_h='-d'in self.env['BISONFLAGS'] + outs=[] + if node.name.endswith('.yc'): + outs.append(node.change_ext('.tab.cc')) + if has_h: + outs.append(node.change_ext('.tab.hh')) + else: + outs.append(node.change_ext('.tab.c')) + if has_h: + outs.append(node.change_ext('.tab.h')) + tsk=self.create_task('bison',node,outs) + tsk.cwd=node.parent.get_bld().abspath() + self.source.append(outs[0]) +def configure(conf): + conf.find_program('bison',var='BISON') + conf.env.BISONFLAGS=['-d'] |
