summaryrefslogtreecommitdiffstats
path: root/waf_libbsd.py
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2018-05-07 10:19:28 +0200
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2018-08-01 09:55:27 +0200
commit01855a5acd8bea448b5cd83d61fa9a7ebbf1815e (patch)
tree4d2a1a394c3f19adc48d0bf64ca54cd04a51fdae /waf_libbsd.py
parent879eaa7c1a62cb8043b63242e5d339f0ced50f29 (diff)
downloadrtems-libbsd-01855a5acd8bea448b5cd83d61fa9a7ebbf1815e.tar.bz2
waf: Allow to only generate lex and yacc.
In some applications, it's usefull if the files generated by lex or yacc are not build automatically. With that it is for example possible to create a wrapper source file that sets some defines before the generated code is parsed.
Diffstat (limited to 'waf_libbsd.py')
-rw-r--r--waf_libbsd.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/waf_libbsd.py b/waf_libbsd.py
index bbc8b42c..597e882e 100644
--- a/waf_libbsd.py
+++ b/waf_libbsd.py
@@ -361,12 +361,13 @@ class Builder(builder.ModuleManager):
bld(target = lex['file'][:-2]+ '.c',
source = lex['file'],
rule = lex_rule)
- bld.objects(target = 'lex_%s' % (lex['sym']),
- features = 'c',
- cflags = cflags,
- includes = lexIncludes + includes,
- defines = defines + lexDefines,
- source = lex['file'][:-2] + '.c')
+ if lex['build']:
+ bld.objects(target = 'lex_%s' % (lex['sym']),
+ features = 'c',
+ cflags = cflags,
+ includes = lexIncludes + includes,
+ defines = defines + lexDefines,
+ source = lex['file'][:-2] + '.c')
libbsd_use += ['lex_%s' % (lex['sym'])]
#
@@ -398,12 +399,13 @@ class Builder(builder.ModuleManager):
bld(target = yaccFile[:-2] + '.c',
source = yaccFile,
rule = yacc_rule)
- bld.objects(target = 'yacc_%s' % (yaccSym),
- features = 'c',
- cflags = cflags,
- includes = yaccIncludes + includes,
- defines = defines + yaccDefines,
- source = yaccFile[:-2] + '.c')
+ if yacc['build']:
+ bld.objects(target = 'yacc_%s' % (yaccSym),
+ features = 'c',
+ cflags = cflags,
+ includes = yaccIncludes + includes,
+ defines = defines + yaccDefines,
+ source = yaccFile[:-2] + '.c')
libbsd_use += ['yacc_%s' % (yaccSym)]
#