From 0f3b42ce806a1ed5a5bf9cbe23b9e3fc1bac9095 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 19 Oct 2026 09:44:07 +0200 Subject: [PATCH] Add missing dependencies to meson headerscheck target These checks compile headers, so all the headers they might include need to have been generated. The makefile target does that, but the meson implementation didn't do that. (Arguably a bit of a bug in commit e82fc27e095.) Add the required dependencies so that meson compile headerscheck works in an unbuilt tree as well (as is documented). Reviewed-by: Nazir Bilal Yavuz Discussion: https://www.postgresql.org/message-id/flat/e52e2c29-4834-4c64-a200-eddcba38fb4d%40eisentraut.org --- meson.build | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index d05634fef0d..7e95fd5941d 100644 --- a/meson.build +++ b/meson.build @@ -4138,12 +4138,24 @@ add_test_setup('running', ############################################################### headerscheck = files('src/tools/pginclude/headerscheck') + +# These checks compile headers, so all the headers they might include +# need to have been generated. +headerscheck_depends = [ + generated_headers_stamp, + generated_backend_headers_stamp, + backend_parser, + jsonpath_gram, +] + run_target('headerscheck', - command: [headerscheck, meson.project_source_root(), meson.project_build_root()] + command: [headerscheck, meson.project_source_root(), meson.project_build_root()], + depends: headerscheck_depends, ) run_target('cpluspluscheck', - command: [headerscheck, '--cplusplus', meson.project_source_root(), meson.project_build_root()] + command: [headerscheck, '--cplusplus', meson.project_source_root(), meson.project_build_root()], + depends: headerscheck_depends, )