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 <byavuz81@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/e52e2c29-4834-4c64-a200-eddcba38fb4d%40eisentraut.org
This commit is contained in:
Peter Eisentraut committed 2026-10-19 10:32:45 +02:00
1 parent 23192ac644
commit 0f3b42ce80
1 file changed
+14 -2
+14 -2
View File
@@ -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,
)