From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jeff King <peff@peff.net>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
git@vger.kernel.org, "Emily Shaffer" <emilyshaffer@google.com>,
"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] Makefile: add missing dependencies of 'config-list.h'
Date: Tue, 13 Apr 2021 21:07:25 +0200 [thread overview]
Message-ID: <87czuy2ec2.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <YG+UeQRwdBsVeRNV@coredump.intra.peff.net>
On Fri, Apr 09 2021, Jeff King wrote:
> On Fri, Apr 09, 2021 at 12:08:23AM +0200, Ævar Arnfjörð Bjarmason wrote:
>
>> > -config-list.h:
>> > +config-list.h: Documentation/*config.txt Documentation/config/*.txt
>> > $(QUIET_GEN)$(SHELL_PATH) ./generate-configlist.sh \
>> > >$@+ && mv $@+ $@
>> >
>> > command-list.h: generate-cmdlist.sh command-list.txt
>> >
>> > -command-list.h: $(wildcard Documentation/git*.txt) Documentation/*config.txt Documentation/config/*.txt
>> > +command-list.h: $(wildcard Documentation/git*.txt)
>> > $(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh \
>> > $(patsubst %,--exclude-program %,$(EXCLUDED_PROGRAMS)) \
>> > command-list.txt >$@+ && mv $@+ $@
>>
>> This change makes sense.
>
> I agree it looks like it's moving in the right direction, but I am
> slightly puzzled by the existing code. Why do we need to use $(wildcard)
> for git*.txt, but not for the others?
>
>> I have a not-yet-submitted patch series where I added some more
>> config/*/*.txt that wouldn't be caught by this rule, I'd updated the
>> Documentation/Makefile, but missed this part in the top-level Makefile.
>>
>> So a relation question: Does anyone actually prefer this state of
>> affairs of having a Makefile, Documentation/Makefile, t/Makefile
>> t/perf/Makefile and template/Makefile?
>>
>> It seems to me with ever-closer coupling between them that it's getting
>> to be more of a hassle to manage state between them than it would be to
>> just move them all into one big Makefile.
>
> Yes, I'm generally a fan of avoiding recursive make when we can. I think
> the caveats are:
>
> - it would be nice to continue to have stub Makefiles in
> sub-directories that trigger the main one (so "cd t && make"
> continues to work, for example).
Yeah, we should definitely keep those in place. I also wonder if various
rules for local wildcards will be more complex when they need to reach
into subdirectories.
> - we may need some cleanup of parts of the top-level Makefile which
> are triggered without dependencies (e.g., I think we unconditionally
> run some scripts to compute GIT_VERSION in the top-level; this is
> already a bit wasteful, but may get even more so as we add more
> rules from sub-directories).
>
> Mostly my argument against it (and why I haven't purused it) would be:
> it sounds like a lot of work and risk of regression, and the current
> system seems pretty fine in practice.
One edge case I discovered the other day but didn't bother debugging
much was make at the top-level failing because "doc.dep" in
Documentation/Makefile uses this pattern:
rm x &&
script >x
Which would normally work in one Makefile, but in this case two rules in
the top-level called unrelated "make -C Documentation [...]", so both of
those sub-processes end up needing to generate the doc.dep, and they
race each other.
Another thing fixed (or, worked around) with a wider application of [1].
1. https://lore.kernel.org/git/patch-3.6-96e2338ed8e-20210329T161723Z-avarab@gmail.com/
next prev parent reply other threads:[~2021-04-13 19:07 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 21:18 [PATCH v13 0/5] git-bugreport with fixed VS build Emily Shaffer
2020-04-16 21:18 ` [PATCH v13 1/5] help: move list_config_help to builtin/help Emily Shaffer
2020-04-16 22:21 ` Junio C Hamano
2020-04-16 22:28 ` Junio C Hamano
2020-04-17 19:36 ` Emily Shaffer
2020-04-17 2:04 ` Danh Doan
2020-04-17 2:11 ` Danh Doan
2021-04-08 21:29 ` [PATCH] Makefile: add missing dependencies of 'config-list.h' SZEDER Gábor
2021-04-08 22:08 ` Ævar Arnfjörð Bjarmason
2021-04-08 23:40 ` Jeff King
2021-04-09 21:20 ` SZEDER Gábor
2021-04-16 19:03 ` Junio C Hamano
2021-04-16 21:33 ` SZEDER Gábor
2021-04-16 22:25 ` Junio C Hamano
2021-04-13 19:07 ` Ævar Arnfjörð Bjarmason [this message]
2020-04-16 21:18 ` [PATCH v13 2/5] bugreport: add tool to generate debugging info Emily Shaffer
2020-08-12 15:53 ` SZEDER Gábor
2021-04-08 21:36 ` SZEDER Gábor
2020-04-16 21:18 ` [PATCH v13 3/5] bugreport: gather git version and build info Emily Shaffer
2020-04-16 21:18 ` [PATCH v13 4/5] bugreport: add uname info Emily Shaffer
2021-04-08 22:19 ` Ævar Arnfjörð Bjarmason
2021-04-08 22:25 ` Junio C Hamano
2021-04-08 22:33 ` Ævar Arnfjörð Bjarmason
2021-04-08 23:41 ` Emily Shaffer
2021-04-08 23:58 ` Junio C Hamano
2021-04-09 21:27 ` SZEDER Gábor
2021-04-11 14:33 ` [PATCH] t0091-bugreport.sh: actually verify some content of report Martin Ågren
2021-04-12 17:17 ` Junio C Hamano
2021-04-13 18:32 ` Martin Ågren
2021-04-13 19:27 ` Ævar Arnfjörð Bjarmason
2021-04-13 22:21 ` Emily Shaffer
2023-07-01 19:26 ` [PATCH v2] " Martin Ågren
2023-07-03 15:47 ` Phillip Wood
2023-07-05 18:31 ` Martin Ågren
2023-07-05 18:40 ` [PATCH v3] " Martin Ågren
2023-07-05 19:46 ` Phillip Wood
2021-04-13 19:44 ` [PATCH] " SZEDER Gábor
2020-04-16 21:18 ` [PATCH v13 5/5] bugreport: add compiler info Emily Shaffer
2021-04-08 22:23 ` Ævar Arnfjörð Bjarmason
2021-04-08 22:59 ` Đoàn Trần Công Danh
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czuy2ec2.fsf@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=szeder.dev@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).