]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Move flex, bison, python and ragel modules to archive
authorFred Morcos <fred.morcos@open-xchange.com>
Thu, 31 Aug 2023 10:06:09 +0000 (12:06 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:49 +0000 (13:28 +0100)
meson-archive/bison/meson.build [new file with mode: 0644]
meson-archive/flex/meson.build [new file with mode: 0644]
meson-archive/python/meson.build [new file with mode: 0644]
meson-archive/ragel/meson.build [new file with mode: 0644]

diff --git a/meson-archive/bison/meson.build b/meson-archive/bison/meson.build
new file mode 100644 (file)
index 0000000..8ff17f1
--- /dev/null
@@ -0,0 +1,11 @@
+bison = find_program('bison', required: true)
+
+summary('Bison', bison.found(), bool_yn: true, section: 'Programs')
+summary('Bison Path', bison.full_path(), section: 'Programs')
+summary('Bison Version', bison.version(), section: 'Programs')
+
+bison_generator = generator(
+  bison,
+  output: '@BASENAME@.cc',
+  arguments: ['-d', '--verbose', '--debug', '--output=@OUTPUT@', '@INPUT@'],
+)
diff --git a/meson-archive/flex/meson.build b/meson-archive/flex/meson.build
new file mode 100644 (file)
index 0000000..1ef5905
--- /dev/null
@@ -0,0 +1,11 @@
+flex = find_program('flex', required: true)
+
+summary('Flex', flex.found(), bool_yn: true, section: 'Programs')
+summary('Flex Path', flex.full_path(), section: 'Programs')
+summary('Flex Version', flex.version(), section: 'Programs')
+
+flex_generator = generator(
+  flex,
+  output: '@BASENAME@.c',
+  arguments: ['--case-insensitive', '--outfile=@OUTPUT@', '@INPUT@'],
+)
diff --git a/meson-archive/python/meson.build b/meson-archive/python/meson.build
new file mode 100644 (file)
index 0000000..ae1f72a
--- /dev/null
@@ -0,0 +1,10 @@
+py = import('python')
+python_prog = py.find_installation(
+  'python3',
+  modules: from_git ? ['yaml'] : [],
+  required: from_git,
+)
+
+summary('Python', python_prog.found(), bool_yn: true, section: 'Python')
+summary('Path', python_prog.full_path(), section: 'Python')
+summary('Version', python_prog.version(), section: 'Python')
diff --git a/meson-archive/ragel/meson.build b/meson-archive/ragel/meson.build
new file mode 100644 (file)
index 0000000..d77aa37
--- /dev/null
@@ -0,0 +1,11 @@
+ragel = find_program('ragel', required: false)
+
+summary('Ragel', ragel.found(), bool_yn: ragel.found(), section: 'Programs')
+summary('Ragel Path', ragel.full_path(), section: 'Programs')
+summary('Ragel Version', ragel.version(), section: 'Programs')
+
+ragel_generator = generator(
+  ragel,
+  output: '@BASENAME@.cc',
+  arguments: ['@INPUT@', '-o', '@OUTPUT@'],
+)