subdir('meson' / 'gnutls') # GnuTLS
subdir('meson' / 'dot') # DNS over TLS
subdir('meson' / 'ipcipher') # IPCipher
-subdir('meson' / 'prog-ragel') # Find Ragel
+subdir('meson' / 'ragel') # Find Ragel and create generator
subdir('meson' / 'clock-gettime') # Clock_gettime
subdir('meson' / 'boost') # Boost
subdir('meson' / 'boost-program-options') # Boost Program Options Library
subdir('meson' / 'sanitizers') # Sanitizers
subdir('meson' / 'malloc-trace') # Malloc-trace
-# Find or generate pdns/dnslabeltext.cc
-if not ragel.found() and not fs.exists('pdns/dnslabeltext.cc')
+# Find ragel or pdns/dnslabeltext.cc
+if not ragel.found() and not fs.exists('pdns' / 'dnslabeltext.cc')
error('Ragel is missing and `pdns/dnslabeltext.cc` cannot be found. ' +
'Install Ragel or download the sources from www.powerdns.com')
endif
-# TODO Generate pdns/dnslabeltext.cc
# Backend Unit Tests
opt_backend_unittests = get_option('unit-tests-backends')
+++ /dev/null
-# Find Ragel
-# Outputs: ragel
-
-ragel = find_program('ragel', required: false)
-
-summary('Ragel', ragel.found(), bool_yn: ragel.found(), section: 'Programs')
--- /dev/null
+# Find Ragel and create generator
+# Outputs: ragel
+
+ragel = find_program('ragel', required: false)
+summary('Ragel', ragel.found(), bool_yn: ragel.found(), section: 'Programs')
+# summary('Ragel', ragel.full_path(), section: 'System') # TODO Meson 0.55
+# summary('Ragel Version', ragel.version(), section: 'System') # TODO Meson 0.62
+
+ragel_generator = generator(
+ ragel,
+ output: '@BASENAME@.cc',
+ arguments: ['@INPUT@', '-o', '@OUTPUT@'],
+)