meson: restore hook-list.h to builtin_sources

This fixes a racy build failure. ``` builtin/bugreport.c:12:10: fatal error: hook-list.h: No such file or directory 12 | #include "hook-list.h" | ^~~~~~~~~~~~~ ``` hook-list.h must be generated before builtin/bugreport.c is compiled. Bug: https://bugs.gentoo.org/978326 Fixes: 2eb541e8f2a9 (hook: move is_known_hook() to hook.c for wider use, 2026-04-10) Signed-off-by: Mike Gilbert <floppym@gentoo.org> Acked-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Mike Gilbert committed Jul 1, 2026 at 15:39 UTC 10ab1af0f4446dcbc2b34773da9a9d0a9eb2b69f
1 file changed +14 -12
meson.build
+14 -12
@@ -278,7 +278,20 @@ compat_sources = [
278 'compat/terminal.c',
279 ]
280
281 +hook_list = custom_target(
282 + input: 'Documentation/githooks.adoc',
283 + output: 'hook-list.h',
284 + command: [
285 + shell,
286 + meson.current_source_dir() + '/tools/generate-hooklist.sh',
287 + meson.current_source_dir(),
288 + '@OUTPUT@',
289 + ],
290 + env: script_environment,
291 +)
292 +
293 libgit_sources = [
294 + hook_list,
295 'abspath.c',
296 'add-interactive.c',
297 'add-patch.c',
@@ -566,19 +579,8 @@ libgit_sources += custom_target(
579 env: script_environment,
580 )
581
569 -libgit_sources += custom_target(
570 - input: 'Documentation/githooks.adoc',
571 - output: 'hook-list.h',
572 - command: [
573 - shell,
574 - meson.current_source_dir() + '/tools/generate-hooklist.sh',
575 - meson.current_source_dir(),
576 - '@OUTPUT@',
577 - ],
578 - env: script_environment,
579 -)
580 -
582 builtin_sources = [
583 + hook_list,
584 'builtin/add.c',
585 'builtin/am.c',
586 'builtin/annotate.c',