]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3730] Replace HAS_KEA_MSG_COMPILER with KEA_MSG_COMPILER.found()
authorAndrei Pavel <andrei@isc.org>
Fri, 21 Feb 2025 09:33:11 +0000 (11:33 +0200)
committerAndrei Pavel <andrei@isc.org>
Fri, 21 Feb 2025 16:43:17 +0000 (18:43 +0200)
30 files changed:
meson.build
src/bin/agent/meson.build
src/bin/dhcp4/meson.build
src/bin/dhcp6/meson.build
src/bin/lfc/meson.build
src/bin/netconf/meson.build
src/hooks/dhcp/bootp/meson.build
src/hooks/dhcp/flex_option/meson.build
src/hooks/dhcp/high_availability/meson.build
src/hooks/dhcp/lease_cmds/meson.build
src/hooks/dhcp/mysql/meson.build
src/hooks/dhcp/perfmon/meson.build
src/hooks/dhcp/pgsql/meson.build
src/hooks/dhcp/run_script/meson.build
src/hooks/dhcp/stat_cmds/meson.build
src/hooks/dhcp/user_chk/meson.build
src/lib/asiodns/meson.build
src/lib/config/meson.build
src/lib/d2srv/meson.build
src/lib/database/meson.build
src/lib/dhcp_ddns/meson.build
src/lib/dhcpsrv/meson.build
src/lib/eval/meson.build
src/lib/hooks/meson.build
src/lib/http/meson.build
src/lib/log/compiler/meson.build
src/lib/log/meson.build
src/lib/log/tests/meson.build
src/lib/process/meson.build
src/lib/tcp/meson.build

index 8979563a1b893110c8fec2a0c0bb18191633b275..26dad43a9645ea3ca44c5a8e66e0be33e8223ed4 100644 (file)
@@ -181,8 +181,8 @@ endif
 if awk_exe.found()
     AWK = awk_exe.full_path()
 endif
-CD_AND_RUN = f'@TOP_SOURCE_DIR@/cd-and-run.sh'
-KEA_MSG_COMPILER = f'@TOP_BUILD_DIR@/src/lib/log/compiler/kea-msg-compiler'
+CD_AND_RUN = find_program(f'@TOP_SOURCE_DIR@/cd-and-run.sh')
+KEA_MSG_COMPILER = disabler()
 
 #### Dependencies
 
index 8b5f21057705779d1e6cf2c999811b03d8c0c25a..0e6d876061cf3f5ee7a91ed098c9d1b23b255532 100644 (file)
@@ -26,7 +26,7 @@ executable(
 subdir('tests')
 
 current_source_dir = meson.current_source_dir()
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-bin-agent-ca_messages',
         command: [
index 6c0fce94c394e0d90aee045ee7e89f1b61c2d2ed..5cf52751755ce00fb2e4aab21cbaa5b4fa4a43e6 100644 (file)
@@ -25,7 +25,7 @@ executable(
 subdir('tests')
 
 current_source_dir = meson.current_source_dir()
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-bin-dhcp4-dhcp4_messages',
         command: [
index 37d9a6dec855373aa31eeb9dcc849ccf08e078c5..08fbbf0a258ecbde0ce5169f133ce5885ed6df20 100644 (file)
@@ -26,7 +26,7 @@ executable(
 subdir('tests')
 
 current_source_dir = meson.current_source_dir()
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-bin-dhcp6-dhcp6_messages',
         command: [
index 90ddb6ce2893cca34011cb8b9836e9146450f2e2..6138e4b5a5d95a3ae0c16eedec4d4019fe75b1b7 100644 (file)
@@ -15,7 +15,7 @@ executable(
 )
 subdir('tests')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-bin-lfc-lfc_messages',
         command: [
index 8b196a684791ccf6fc5e7f477b12737d71e1378b..f90834a890747236449332d540a4f694496141af 100644 (file)
@@ -39,7 +39,7 @@ executable(
 subdir('tests')
 
 current_source_dir = meson.current_source_dir()
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-bin-netconf-netconf_messages',
         command: [
index a07848cc4ee519ca29c09c43fa934d8af9b0a43f..186c936163f9b4dd75161c256cec45d1d26c39f5 100644 (file)
@@ -17,7 +17,7 @@ dhcp_bootp_archive = static_library(
 subdir('libloadtests')
 subdir('tests')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-hooks-dhcp-bootp-bootp_messages',
         command: [
index f2f77016d5f4780f61bef4d4a9d7443348bb7393..d0a34b1958627fbc3247a075a68bbf0235e8bf92 100644 (file)
@@ -19,7 +19,7 @@ dhcp_flex_option_archive = static_library(
 subdir('libloadtests')
 subdir('tests')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-hooks-dhcp-flex_option-flex_option_messages',
         command: [
index 30300fec8260eda7b3b763d85203d6e4f4acede7..93eb4d831b1710b4aceecad44dc49bca08e2dcf4 100644 (file)
@@ -28,7 +28,7 @@ dhcp_ha_archive = static_library(
 subdir('libloadtests')
 subdir('tests')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-hooks-dhcp-high_availability-ha_messages',
         command: [
index 863c498606ef13c140f1d269c802b020aecf7932..6fa6fbd7b08a1c320c17d9835bea0a3b6a6bb950 100644 (file)
@@ -21,13 +21,13 @@ dhcp_lease_cmds_archive = static_library(
 subdir('libloadtests')
 subdir('tests')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-hooks-dhcp-lease_cmds-lease_cmds_messages',
         command: [
             CD_AND_RUN,
             TOP_SOURCE_DIR,
-            kea_msg_compiler,
+            KEA_MSG_COMPILER,
             'src/hooks/dhcp/lease_cmds/lease_cmds_messages.mes',
         ],
     )
index 3786d9d3327f3f503bb02af8f0153cace477dce7..c7c8640e47597ecf2be7d0b7f1f5f51d2973df09 100644 (file)
@@ -31,7 +31,7 @@ dhcp_mysql_archive = static_library(
 subdir('libloadtests')
 subdir('tests')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-hooks-dhcp-mysql-mysql_cb_messages',
         command: [
index 75c71ac06b821d124589ad5fcbd39119504b42ea..4d8a60db92e91bdd879e99326f6df450904e5ecb 100644 (file)
@@ -24,7 +24,7 @@ dhcp_perfmon_archive = static_library(
 subdir('libloadtests')
 subdir('tests')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-hooks-dhcp-perfmon-perfmon_messages',
         command: [
index f764ce062b7d70992b94a6d09dd4a0d798518695..5da54562b73052f631a117088bb0be105f059f79 100644 (file)
@@ -31,7 +31,7 @@ dhcp_pgsql_archive = static_library(
 subdir('libloadtests')
 subdir('tests')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-hooks-dhcp-pgsql-pgsql_cb_messages',
         command: [
index 61631754f01a2ac3a3cef80ea1985d6b1d7d4d15..30c7c8495590cf40dea28c6c7ff9fce72868b1b1 100644 (file)
@@ -20,7 +20,7 @@ dhcp_run_script_archive = static_library(
 subdir('tests')
 subdir('libloadtests')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-hooks-dhcp-run_script-run_script_messages',
         command: [
index 6279f71bbfaf16ecc2baa52a171cb35de114a398..a43d130d3ba4e744f17bb84a034507ce5ff5daf9 100644 (file)
@@ -18,7 +18,7 @@ dhcp_stat_cmds_archive = static_library(
 )
 subdir('libloadtests')
 subdir('tests')
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-hooks-dhcp-stat_cmds-stat_cmds_messages',
         command: [
index 6d52018d2c63ee5278aa757b926d9f5a1aecc369..40439edbd8b0878656c3095e40129ffcec4f8a05 100644 (file)
@@ -23,7 +23,7 @@ dhcp_user_chk_archive = static_library(
 )
 subdir('tests')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-hooks-dhcp-user_chk-user_chk_messages',
         command: [
index 9a8764a118dcd4f8655a0e8c08f8b7d746418a83..9a1f80e0446e85c14a3005395726f7585cacf073 100644 (file)
@@ -13,7 +13,7 @@ subdir('tests')
 kea_asiodns_headers = ['asiodns_messages.h', 'io_fetch.h', 'logger.h']
 install_headers(kea_asiodns_headers, preserve_path: true, subdir: 'kea/asiodns')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-asiodns-asiodns_messages',
index 6f64b8906d3cd99c869824357ecc9f6d42569f63..0efcbc8d62f54cf22e6e99ba2e99fa9198b91e62 100644 (file)
@@ -42,7 +42,7 @@ kea_config_headers = [
 ]
 install_headers(kea_config_headers, preserve_path: true, subdir: 'kea/config')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-config-config_messages',
index dd7389c9a43428b9bedee98478dba009cec45f0a..41e9b1a03841906752cff6147a1602159f980532 100644 (file)
@@ -35,7 +35,7 @@ kea_d2srv_headers = [
 ]
 install_headers(kea_d2srv_headers, preserve_path: true, subdir: 'kea/d2srv')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-d2srv-d2_messages',
index b81fd5e7381815883bff346f87b2f195758703fe..3dde239c41ebc7328c28b8c812469a7eeba5a3a7 100644 (file)
@@ -35,7 +35,7 @@ install_headers(
     subdir: 'kea/database',
 )
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-database-db_messages',
index 84461b2a92429e9d498af3a90afbbb17b778f23f..566532f59db25f3b32fcb5e5b7766e1e6377ca19 100644 (file)
@@ -25,7 +25,7 @@ install_headers(
     subdir: 'kea/dhcp_ddns',
 )
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-dhcp_ddns-dhcp_ddns_messages',
index 44a5a97ce28c0388d9a34b7e5fe0e6a95d5a57c8..0b0189997a78f00fa476cd1aa5976e23a66f09eb 100644 (file)
@@ -206,7 +206,7 @@ kea_dhcpsrv_headers = [
 ]
 install_headers(kea_dhcpsrv_headers, preserve_path: true, subdir: 'kea/dhcpsrv')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-dhcpsrv-alloc_engine_messages',
index 9b4452b1484563df9193241adc0283cd2f8ccbbf..ac71603a3e80b8282d76f73775f3f56a9a47204b 100644 (file)
@@ -28,7 +28,7 @@ kea_eval_headers = [
 install_headers(kea_eval_headers, preserve_path: true, subdir: 'kea/eval')
 
 current_source_dir = meson.current_source_dir()
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     target_gen_messages = run_target(
         'src-lib-eval-eval_messages',
         command: [
index e43fdcea889f2a3ff5ba8a66fd74ddd0a59415fa..3da5399d4e4abd4e7ad4f1a3ec2f1c440b04be2b 100644 (file)
@@ -41,7 +41,7 @@ kea_hooks_headers = [
 ]
 install_headers(kea_hooks_headers, preserve_path: true, subdir: 'kea/hooks')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-hooks-hooks_messages',
index b4c717ed6680ec569c1fe0c16e44cc748b1d44df..3dd266597f26e4393eab42155c255168bcdae8b2 100644 (file)
@@ -69,7 +69,7 @@ kea_http_headers = [
 ]
 install_headers(kea_http_headers, preserve_path: true, subdir: 'kea/http')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-http-auth_messages',
index 1fcef3297272becc8051b7c023f1c5da7807f86e..66875a6a961e91e29e2f350e7ef6e1ec9b467df2 100644 (file)
@@ -1,13 +1,11 @@
 if meson.is_cross_build()
-    HAS_KEA_MSG_COMPILER = false
     subdir_done()
 endif
 
-kea_msg_compiler = executable(
+KEA_MSG_COMPILER = executable(
     'kea-msg-compiler',
     'message.cc',
     include_directories: INCLUDES,
     install_dir: 'bin',
     link_with: LIBS_BUILT_SO_FAR,
 )
-HAS_KEA_MSG_COMPILER = true
index 4b4678460b75aca247aee2cf49e060dbe0798d76..23d8ade19d56d8b5120b1a8e15997f2874b923a9 100644 (file)
@@ -55,7 +55,7 @@ kea_log_headers = [
 ]
 install_headers(kea_log_headers, preserve_path: true, subdir: 'kea/log')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-log-log_messages',
index b15cae13020770853e7e19544d587294a998c443..c3cd9d9a049bdc1077fcc507d658f9887bc3e486 100644 (file)
@@ -90,7 +90,7 @@ foreach shtest : shtests
     )
 endforeach
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-log-tests-log_test_messages',
index 422ed5618b9582c7dcea91e013244e76d0f7ed50..597a7f3381abdb174c853c5931497f07c8c1b8bc 100644 (file)
@@ -39,7 +39,7 @@ kea_process_headers = [
 ]
 install_headers(kea_process_headers, preserve_path: true, subdir: 'kea/process')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-process-process_messages',
index 554cda4dc7097f5023c7262df06b4c1217c23461..ef9895b0430be075f8ad8d656bc02ef5c78f691f 100644 (file)
@@ -27,7 +27,7 @@ kea_tcp_headers = [
 ]
 install_headers(kea_tcp_headers, preserve_path: true, subdir: 'kea/tcp')
 
-if HAS_KEA_MSG_COMPILER
+if KEA_MSG_COMPILER.found()
     current_source_dir = meson.current_source_dir()
     target_gen_messages = run_target(
         'src-lib-tcp-tcp_messages',