Skip to content

Commit 502d069

Browse files
pks-tgitster
authored andcommitted
meson: fix dependencies for generated headers
We generate a couple of headers from our documentation. These headers are added to the libgit sources, but two of them aren't used by the library, but instead by our builtins. This can cause parallel builds to fail because the builtin object may be compiled before the header was generated. Fix the issue by adding both "config-list.h" and "hook-list.h" to the list of builtin sources. While "command-list.h" is generated similarly, it is used by "help.c" and thus part of the libgit sources indeed. Reported-by: Evan Martin <[email protected]> Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 12f6f47 commit 502d069

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

meson.build

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,13 @@ libgit_sources = [
480480
'xdiff/xutils.c',
481481
]
482482

483+
libgit_sources += custom_target(
484+
input: 'command-list.txt',
485+
output: 'command-list.h',
486+
command: [shell, meson.current_source_dir() + '/generate-cmdlist.sh', meson.current_source_dir(), '@OUTPUT@'],
487+
env: script_environment,
488+
)
489+
483490
builtin_sources = [
484491
'builtin/add.c',
485492
'builtin/am.c',
@@ -607,14 +614,7 @@ builtin_sources = [
607614
'builtin/write-tree.c',
608615
]
609616

610-
libgit_sources += custom_target(
611-
input: 'command-list.txt',
612-
output: 'command-list.h',
613-
command: [shell, meson.current_source_dir() + '/generate-cmdlist.sh', meson.current_source_dir(), '@OUTPUT@'],
614-
env: script_environment,
615-
)
616-
617-
libgit_sources += custom_target(
617+
builtin_sources += custom_target(
618618
output: 'config-list.h',
619619
command: [
620620
shell,
@@ -625,7 +625,7 @@ libgit_sources += custom_target(
625625
env: script_environment,
626626
)
627627

628-
libgit_sources += custom_target(
628+
builtin_sources += custom_target(
629629
input: 'Documentation/githooks.txt',
630630
output: 'hook-list.h',
631631
command: [

0 commit comments

Comments
 (0)