Skip to content

Commit 53d75bd

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 6ff9917 commit 53d75bd

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
@@ -487,6 +487,13 @@ libgit_sources = [
487487
'xdiff/xutils.c',
488488
]
489489

490+
libgit_sources += custom_target(
491+
input: 'command-list.txt',
492+
output: 'command-list.h',
493+
command: [shell, meson.current_source_dir() + '/generate-cmdlist.sh', meson.current_source_dir(), '@OUTPUT@'],
494+
env: script_environment,
495+
)
496+
490497
builtin_sources = [
491498
'builtin/add.c',
492499
'builtin/am.c',
@@ -614,14 +621,7 @@ builtin_sources = [
614621
'builtin/write-tree.c',
615622
]
616623

617-
libgit_sources += custom_target(
618-
input: 'command-list.txt',
619-
output: 'command-list.h',
620-
command: [shell, meson.current_source_dir() + '/generate-cmdlist.sh', meson.current_source_dir(), '@OUTPUT@'],
621-
env: script_environment,
622-
)
623-
624-
libgit_sources += custom_target(
624+
builtin_sources += custom_target(
625625
output: 'config-list.h',
626626
command: [
627627
shell,
@@ -632,7 +632,7 @@ libgit_sources += custom_target(
632632
env: script_environment,
633633
)
634634

635-
libgit_sources += custom_target(
635+
builtin_sources += custom_target(
636636
input: 'Documentation/githooks.txt',
637637
output: 'hook-list.h',
638638
command: [

0 commit comments

Comments
 (0)