Merge branch 'mg/meson-hook-list-buildfix' into next

A racy build failure under Meson has been corrected by ensuring that
the generated header file 'hook-list.h' is built before compiling files
in 'builtin_sources' that depend on it.

* mg/meson-hook-list-buildfix:
  meson: restore hook-list.h to builtin_sources
next
Junio C Hamano 2026-07-08 12:07:01 -07:00
commit 10763a0ebc
1 changed files with 14 additions and 12 deletions

View File

@ -278,7 +278,20 @@ compat_sources = [
'compat/terminal.c',
]

hook_list = custom_target(
input: 'Documentation/githooks.adoc',
output: 'hook-list.h',
command: [
shell,
meson.current_source_dir() + '/tools/generate-hooklist.sh',
meson.current_source_dir(),
'@OUTPUT@',
],
env: script_environment,
)

libgit_sources = [
hook_list,
'abspath.c',
'add-interactive.c',
'add-patch.c',
@ -568,19 +581,8 @@ libgit_sources += custom_target(
env: script_environment,
)

libgit_sources += custom_target(
input: 'Documentation/githooks.adoc',
output: 'hook-list.h',
command: [
shell,
meson.current_source_dir() + '/tools/generate-hooklist.sh',
meson.current_source_dir(),
'@OUTPUT@',
],
env: script_environment,
)

builtin_sources = [
hook_list,
'builtin/add.c',
'builtin/am.c',
'builtin/annotate.c',