From 14bb16544cb3fa13b37a599d506f811dc11a09ab Mon Sep 17 00:00:00 2001 From: Fred Morcos Date: Mon, 28 Aug 2023 23:27:58 +0200 Subject: [PATCH] Meson: Conditionally generate dnslabeltext.cc --- meson.build | 7 ------- pdns/meson.build | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/meson.build b/meson.build index b6a5807653..657c2d3607 100644 --- a/meson.build +++ b/meson.build @@ -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 ' + diff --git a/pdns/meson.build b/pdns/meson.build index 0c3c62dc35..b0a4716a71 100644 --- a/pdns/meson.build +++ b/pdns/meson.build @@ -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', -- 2.47.2