Hi Hackers, While hacking on Catalog.pm (over in https://postgr.es/m/87y1l3s7o9.fsf%40wibble.ilmari.org) I noticed that ninja wouldn't rebuild postgres.bki on changes to the module. Here's a patch that adds it to depend_files for the targets I culd find that invoke scripts that use it.
- ilmari
>From 63e8cdbd2509feeb493bf7b52362e8b429e8279c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilm...@ilmari.org> Date: Thu, 1 Jun 2023 13:27:41 +0100 Subject: [PATCH] meson: declare dependency on Catalog.pm for targets that use it --- src/include/catalog/meson.build | 2 +- src/include/nodes/meson.build | 1 + src/include/utils/meson.build | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/include/catalog/meson.build b/src/include/catalog/meson.build index 3179be09d3..01181ae1fc 100644 --- a/src/include/catalog/meson.build +++ b/src/include/catalog/meson.build @@ -111,7 +111,7 @@ generated_catalog_headers = custom_target('generated_catalog_headers', output: output_files, install_dir: output_install, input: input, - depend_files: bki_data_f, + depend_files: bki_data_f + files('../../backend/catalog/Catalog.pm'), build_by_default: true, install: true, command: [ diff --git a/src/include/nodes/meson.build b/src/include/nodes/meson.build index 9a8e85c4a5..dafad003ed 100644 --- a/src/include/nodes/meson.build +++ b/src/include/nodes/meson.build @@ -50,6 +50,7 @@ node_support_install = [ generated_nodes = custom_target('nodetags.h', input: node_support_input, output: node_support_output, + depend_files: files('../../backend/catalog/Catalog.pm'), command: [ perl, files('../../backend/nodes/gen_node_support.pl'), '-o', '@OUTDIR@', diff --git a/src/include/utils/meson.build b/src/include/utils/meson.build index 2fed1e3f8e..3cbe21350c 100644 --- a/src/include/utils/meson.build +++ b/src/include/utils/meson.build @@ -44,6 +44,7 @@ fmgrtab_output = ['fmgroids.h', 'fmgrprotos.h', 'fmgrtab.c'] fmgrtab_target = custom_target('fmgrtab', input: '../catalog/pg_proc.dat', output : fmgrtab_output, + depend_files: files('../../backend/catalog/Catalog.pm'), command: [perl, '-I', '@SOURCE_ROOT@/src/backend/catalog/', files('../../backend/utils/Gen_fmgrtab.pl'), '--include-path=@SOURCE_ROOT@/src/include', '--output=@OUTDIR@', '@INPUT@'], install: true, install_dir: [dir_include_server / 'utils', dir_include_server / 'utils', false], -- 2.39.2