git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Mike Hommey <mh@glandium.org>
Cc: "Jeff King" <peff@peff.net>,
	"Đoàn Trần Công Danh" <congdanhqx@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] Makefile: fix parallel build race
Date: Wed, 17 Nov 2021 11:21:02 +0100	[thread overview]
Message-ID: <211117.86o86j6q0s.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <20211117033938.r3wsv3znxva7smgy@glandium.org>


On Wed, Nov 17 2021, Mike Hommey wrote:

> On Tue, Nov 16, 2021 at 10:18:14PM -0500, Jeff King wrote:
>> 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.
>
> Neither does builtin/help.c. This was discussed in the subthread
> starting at https://lore.kernel.org/all/20211115220455.xse7mhbwabrheej4@glandium.org/
> and is covered by https://lore.kernel.org/all/patch-v3-19.23-234b4eb613c-20211116T114334Z-avarab@gmail.com/
> (to which I responded that the line for hook.o can be removed too)

I've got an updated patch in my just-re-rolled Makefile dependency fixes
series for this isuse, which also addresses the needless "hook.{sp,s,o}
-> hook-list.h" dependency issue:
https://lore.kernel.org/git/patch-v4-19.23-2710f8af6cd-20211117T101807Z-avarab@gmail.com/

Thanks again for looking all of this over & helping to make the Makefile
better.

  reply	other threads:[~2021-11-17 10:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17  1:25 [PATCH] Makefile: fix parallel build race Đoàn Trần Công Danh
2021-11-17  3:18 ` Jeff King
2021-11-17  3:39   ` Mike Hommey
2021-11-17 10:21     ` Ævar Arnfjörð Bjarmason [this message]
2021-11-17 23:14   ` Johannes Schindelin
2021-11-17 23:56     ` Ævar Arnfjörð Bjarmason
2021-11-18  1:19       ` Đoàn Trần Công Danh
2021-11-18 14:36         ` Johannes Schindelin
2021-11-19  7:08           ` Ævar Arnfjörð Bjarmason
2021-11-19  7:06         ` Ævar Arnfjörð Bjarmason
2021-11-19 15:44           ` Johannes Schindelin
2021-11-19 16:48             ` Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=211117.86o86j6q0s.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mh@glandium.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).