From: Andrei Pavel Date: Fri, 21 Feb 2025 09:33:11 +0000 (+0200) Subject: [#3730] Replace HAS_KEA_MSG_COMPILER with KEA_MSG_COMPILER.found() X-Git-Tag: Kea-2.7.7~187 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=ac5c7815755c1d4bced9d9dd83505dfa31985856;p=thirdparty%2Fkea.git [#3730] Replace HAS_KEA_MSG_COMPILER with KEA_MSG_COMPILER.found() --- diff --git a/meson.build b/meson.build index 8979563a1b..26dad43a96 100644 --- a/meson.build +++ b/meson.build @@ -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 diff --git a/src/bin/agent/meson.build b/src/bin/agent/meson.build index 8b5f210577..0e6d876061 100644 --- a/src/bin/agent/meson.build +++ b/src/bin/agent/meson.build @@ -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: [ diff --git a/src/bin/dhcp4/meson.build b/src/bin/dhcp4/meson.build index 6c0fce94c3..5cf5275175 100644 --- a/src/bin/dhcp4/meson.build +++ b/src/bin/dhcp4/meson.build @@ -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: [ diff --git a/src/bin/dhcp6/meson.build b/src/bin/dhcp6/meson.build index 37d9a6dec8..08fbbf0a25 100644 --- a/src/bin/dhcp6/meson.build +++ b/src/bin/dhcp6/meson.build @@ -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: [ diff --git a/src/bin/lfc/meson.build b/src/bin/lfc/meson.build index 90ddb6ce28..6138e4b5a5 100644 --- a/src/bin/lfc/meson.build +++ b/src/bin/lfc/meson.build @@ -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: [ diff --git a/src/bin/netconf/meson.build b/src/bin/netconf/meson.build index 8b196a6847..f90834a890 100644 --- a/src/bin/netconf/meson.build +++ b/src/bin/netconf/meson.build @@ -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: [ diff --git a/src/hooks/dhcp/bootp/meson.build b/src/hooks/dhcp/bootp/meson.build index a07848cc4e..186c936163 100644 --- a/src/hooks/dhcp/bootp/meson.build +++ b/src/hooks/dhcp/bootp/meson.build @@ -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: [ diff --git a/src/hooks/dhcp/flex_option/meson.build b/src/hooks/dhcp/flex_option/meson.build index f2f77016d5..d0a34b1958 100644 --- a/src/hooks/dhcp/flex_option/meson.build +++ b/src/hooks/dhcp/flex_option/meson.build @@ -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: [ diff --git a/src/hooks/dhcp/high_availability/meson.build b/src/hooks/dhcp/high_availability/meson.build index 30300fec82..93eb4d831b 100644 --- a/src/hooks/dhcp/high_availability/meson.build +++ b/src/hooks/dhcp/high_availability/meson.build @@ -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: [ diff --git a/src/hooks/dhcp/lease_cmds/meson.build b/src/hooks/dhcp/lease_cmds/meson.build index 863c498606..6fa6fbd7b0 100644 --- a/src/hooks/dhcp/lease_cmds/meson.build +++ b/src/hooks/dhcp/lease_cmds/meson.build @@ -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', ], ) diff --git a/src/hooks/dhcp/mysql/meson.build b/src/hooks/dhcp/mysql/meson.build index 3786d9d332..c7c8640e47 100644 --- a/src/hooks/dhcp/mysql/meson.build +++ b/src/hooks/dhcp/mysql/meson.build @@ -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: [ diff --git a/src/hooks/dhcp/perfmon/meson.build b/src/hooks/dhcp/perfmon/meson.build index 75c71ac06b..4d8a60db92 100644 --- a/src/hooks/dhcp/perfmon/meson.build +++ b/src/hooks/dhcp/perfmon/meson.build @@ -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: [ diff --git a/src/hooks/dhcp/pgsql/meson.build b/src/hooks/dhcp/pgsql/meson.build index f764ce062b..5da54562b7 100644 --- a/src/hooks/dhcp/pgsql/meson.build +++ b/src/hooks/dhcp/pgsql/meson.build @@ -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: [ diff --git a/src/hooks/dhcp/run_script/meson.build b/src/hooks/dhcp/run_script/meson.build index 61631754f0..30c7c84955 100644 --- a/src/hooks/dhcp/run_script/meson.build +++ b/src/hooks/dhcp/run_script/meson.build @@ -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: [ diff --git a/src/hooks/dhcp/stat_cmds/meson.build b/src/hooks/dhcp/stat_cmds/meson.build index 6279f71bbf..a43d130d3b 100644 --- a/src/hooks/dhcp/stat_cmds/meson.build +++ b/src/hooks/dhcp/stat_cmds/meson.build @@ -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: [ diff --git a/src/hooks/dhcp/user_chk/meson.build b/src/hooks/dhcp/user_chk/meson.build index 6d52018d2c..40439edbd8 100644 --- a/src/hooks/dhcp/user_chk/meson.build +++ b/src/hooks/dhcp/user_chk/meson.build @@ -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: [ diff --git a/src/lib/asiodns/meson.build b/src/lib/asiodns/meson.build index 9a8764a118..9a1f80e044 100644 --- a/src/lib/asiodns/meson.build +++ b/src/lib/asiodns/meson.build @@ -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', diff --git a/src/lib/config/meson.build b/src/lib/config/meson.build index 6f64b8906d..0efcbc8d62 100644 --- a/src/lib/config/meson.build +++ b/src/lib/config/meson.build @@ -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', diff --git a/src/lib/d2srv/meson.build b/src/lib/d2srv/meson.build index dd7389c9a4..41e9b1a038 100644 --- a/src/lib/d2srv/meson.build +++ b/src/lib/d2srv/meson.build @@ -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', diff --git a/src/lib/database/meson.build b/src/lib/database/meson.build index b81fd5e738..3dde239c41 100644 --- a/src/lib/database/meson.build +++ b/src/lib/database/meson.build @@ -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', diff --git a/src/lib/dhcp_ddns/meson.build b/src/lib/dhcp_ddns/meson.build index 84461b2a92..566532f59d 100644 --- a/src/lib/dhcp_ddns/meson.build +++ b/src/lib/dhcp_ddns/meson.build @@ -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', diff --git a/src/lib/dhcpsrv/meson.build b/src/lib/dhcpsrv/meson.build index 44a5a97ce2..0b0189997a 100644 --- a/src/lib/dhcpsrv/meson.build +++ b/src/lib/dhcpsrv/meson.build @@ -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', diff --git a/src/lib/eval/meson.build b/src/lib/eval/meson.build index 9b4452b148..ac71603a3e 100644 --- a/src/lib/eval/meson.build +++ b/src/lib/eval/meson.build @@ -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: [ diff --git a/src/lib/hooks/meson.build b/src/lib/hooks/meson.build index e43fdcea88..3da5399d4e 100644 --- a/src/lib/hooks/meson.build +++ b/src/lib/hooks/meson.build @@ -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', diff --git a/src/lib/http/meson.build b/src/lib/http/meson.build index b4c717ed66..3dd266597f 100644 --- a/src/lib/http/meson.build +++ b/src/lib/http/meson.build @@ -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', diff --git a/src/lib/log/compiler/meson.build b/src/lib/log/compiler/meson.build index 1fcef32972..66875a6a96 100644 --- a/src/lib/log/compiler/meson.build +++ b/src/lib/log/compiler/meson.build @@ -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 diff --git a/src/lib/log/meson.build b/src/lib/log/meson.build index 4b4678460b..23d8ade19d 100644 --- a/src/lib/log/meson.build +++ b/src/lib/log/meson.build @@ -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', diff --git a/src/lib/log/tests/meson.build b/src/lib/log/tests/meson.build index b15cae1302..c3cd9d9a04 100644 --- a/src/lib/log/tests/meson.build +++ b/src/lib/log/tests/meson.build @@ -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', diff --git a/src/lib/process/meson.build b/src/lib/process/meson.build index 422ed5618b..597a7f3381 100644 --- a/src/lib/process/meson.build +++ b/src/lib/process/meson.build @@ -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', diff --git a/src/lib/tcp/meson.build b/src/lib/tcp/meson.build index 554cda4dc7..ef9895b043 100644 --- a/src/lib/tcp/meson.build +++ b/src/lib/tcp/meson.build @@ -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',