tevent_poll: Re-order routines
[Samba/gebeck_regimport.git] / buildtools / wafadmin / Tools / flex.py
blob5ce9f2210e380b01ca56a7aa5271e31c03edd672
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # John O'Meara, 2006
4 # Thomas Nagy, 2006-2008
6 "Flex processing"
8 import TaskGen
10 def decide_ext(self, node):
11 if 'cxx' in self.features: return '.lex.cc'
12 else: return '.lex.c'
14 TaskGen.declare_chain(
15 name = 'flex',
16 rule = '${FLEX} -o${TGT} ${FLEXFLAGS} ${SRC}',
17 ext_in = '.l',
18 ext_out = '.c .cxx',
19 decider = decide_ext
22 def detect(conf):
23 conf.find_program('flex', var='FLEX', mandatory=True)
24 conf.env['FLEXFLAGS'] = ''