]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Conditionally generate dnslabeltext.cc
authorFred Morcos <fred.morcos@open-xchange.com>
Mon, 28 Aug 2023 21:27:58 +0000 (23:27 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:47 +0000 (13:28 +0100)
meson.build
pdns/meson.build

index b6a5807653c4f9ea975593c045b0700aeff72baf..657c2d360737124dd62013980b8dc5728672d528 100644 (file)
@@ -82,13 +82,6 @@ subdir('meson' / 'socket-dir')              # Socket Dir
 subdir('meson' / 'various-functions')       # Various Functions
 subdir('meson' / 'various-headers')         # Various Headers
 
-# TODO Should this be handled in pdns/meson.build instead?
-# 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
-
 # Swagger
 # if not fs.exists('pdns' / 'api-swagger.json') and not python_have_venv
 #   error('Python3 and/or its venv module is not available and ' +
index 0c3c62dc3571480f68f3f4f6cf7bceb010694339..b0a4716a712c3ec796515f68ba444c65a9cf463e 100644 (file)
@@ -158,7 +158,7 @@ libpdns = declare_dependency(
     'uuid-utils.cc',
     'version.cc',
     'zoneparser-tng.cc',
-    ragel_generator.process('dnslabeltext.rl'),
+    fs.is_file('dnslabeltext.cc') ? 'dnslabeltext.cc' : ragel_generator.process('dnslabeltext.rl'),
     extra_files: [
       'arguments.hh',
       'axfr-retriever.hh',