subdir('meson/summary') # Print a system/project summary
subdir('meson/timet-size') # Check the size of time_t
subdir('meson/timet-sign') # Check the sign of time_t
-subdir('meson/prog-flex') # Find flex
-subdir('meson/prog-bison') # Find bison
+subdir('meson/flex') # Find flex and create generator
+subdir('meson/bison') # Find bison and create generator
subdir('meson/platform') # Platform detection
subdir('meson/atomics') # Check atomics support
subdir('meson/pthread-headers') # Check pthread headers
# TODO: Add source files
auth = executable('pdns', config_h, dependencies: deps, export_dynamic: true)
-
-# TODO Generate bindlexer.c and bindparser.cc.
-# bindlexer_c = generator(flex, ...)
-# bindparser_cc = generator(bison, ...)
summary('bison', bison.found(), bool_yn: true, section: 'Programs')
# summary('Bison', bison.full_path(), section: 'System') # TODO Meson 0.55
# summary('Bison Version', bison.version(), section: 'System') # TODO Meson 0.62
+
+bison_generator = generator(
+ bison,
+ output: '@BASENAME@.cc',
+ arguments: ['--verbose', '--debug', '--header=@BUILD_DIR@' / '@BASENAME@.h', '--output=@OUTPUT@', '@INPUT@'],
+)
summary('flex', flex.found(), bool_yn: true, section: 'Programs')
# summary('Flex', flex.full_path(), section: 'System') # TODO Meson 0.55
# summary('Flex Version', flex.version(), section: 'System') # TODO Meson 0.62
+
+flex_generator = generator(
+ flex,
+ output: '@BASENAME@.c',
+ arguments: ['--case-insensitive', '--outfile=@OUTPUT@', '@INPUT@'],
+)