Re: [PATCH] Makefile: fix parallel build race

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 17, 2021 at 08:25:55AM +0700, Đoàn Trần Công Danh wrote:

> * builtin/bugreport.c includes hook-list.h, hence generated files from
> it must depend on hook-list.h

Good catch. This is trivially reproducible with:

  make clean
  make builtin/bugreport.o

The problem comes from cfe853e66b (hook-list.h: add a generated list of
hooks, like config-list.h, 2021-09-26), as you might expect.

> diff --git a/Makefile b/Makefile
> index 241dc322c0..413503b488 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2222,6 +2222,7 @@ git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(GITLIBS)
>  
>  help.sp help.s help.o: command-list.h
>  hook.sp hook.s hook.o: hook-list.h
> +builtin/bugreport.sp builtin/bugreport.s builtin/bugreport.o: hook-list.h

This fix looks correct. I grepped for other similar cases, but this is
the only file that needs it.

Curiously, the existing hook.c does not seem to include hook-list.h,
even though you can see a dependency in the context above. Nor does
help.c, which gained a similar dependency in cfe853e66b. Those seem
superfluous, but maybe I'm missing something.

I wondered if contrib/buildsystems/CMakeLists would need a similar
fixup, but it doesn't have any generated header dependencies at all (not
for hook-list.h, but not for the existing command-list.h). So I'll
assume it's fine (as did cfe853e66b).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux