From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Victoria Dye <vdye@github.com>,
Derrick Stolee <derrickstolee@github.com>
Subject: Re: [PATCH v3 0/4] Makefile: untangle bin-wrappers/% rule complexity
Date: Tue, 01 Nov 2022 02:29:40 +0100 [thread overview]
Message-ID: <221101.86edun5tgn.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <Y2BgRU+HnJjWPzkn@nand.local>
On Mon, Oct 31 2022, Taylor Blau wrote:
> On Mon, Oct 31, 2022 at 11:28:05PM +0100, Ævar Arnfjörð Bjarmason wrote:
>> Ævar Arnfjörð Bjarmason (4):
>> Makefile: factor sed-powered '#!/bin/sh' munging into a variable
>> Makefile: define "TEST_{PROGRAM,OBJS}" variables earlier
>> Makefile: rename "test_bindir_programs" variable, pre-declare
>> Makefile: simplify $(test_bindir_programs) rule by splitting it up
>>
>> Makefile | 70 +++++++++++++++++++++++++++++++++++++++++---------------
>> 1 file changed, 51 insertions(+), 19 deletions(-)
>
> Thanks. I replaced the earlier round with this one and pushed the result
> out to ttaylorr/git.
>
> But having read the topic over again, I have to say that I also find the
> pre-existing behavior to be as expected. "make bin-wrappers/git"
> produces its target as expected, but the target is useless because the
> relationship it has with "git" is a runtime dependency, not a Make-time
> dependency.
>
> So I'm not inclined to pick this one up, honestly. Perhaps other
> reviewers feel differently.
I'm fine with changing that. The part where it makes:
make clean &&
make bin-wrappers/git &&
./git ...
work is a 1-line change to remove, i.e.:
diff --git a/Makefile b/Makefile
index d7ab68e3db8..d3c0a66b4b4 100644
--- a/Makefile
+++ b/Makefile
@@ -3089,7 +3089,6 @@ define bin_wrappers_template
# 4='$(4)'
BW_$(1) = $$($(1):%=bin-wrappers/%)
BIN_WRAPPERS += $$(BW_$(1))
-$$(BW_$(1)): bin-wrappers/% : $(3)%$(4)
$$(BW_$(1)): wrap-for-bin.sh
$$(call mkdir_p_parent_template)
$$(QUIET_GEN)$$(call cmd_munge_bin_wrappers_script,$(2),$(3),$(4))
This topic is mainly about untangling the dense $(filter) mess in the
existing rule, which last came up as we need do to special-case
"scalar", and we'd need to special-case any future binaries.
But I see it's my own fault for making that clear, the "as seen in the
range-diff below" in v2's CL [1] was meant to refer to "here's what's
new in v2", not the topic's reason for existing.
So, while I'm happy to re-roll it and remove that one line (and the
associated part of the commit message) I'm surprised that there's such a
hang-up about this aspect of it, to the point where I think I'm missing
something.
Nothing depends on "bin-wrappers/%" now, so having this harms nothing,
but just seems to me to nicely tie off a loose end.
I'm aware that e.g. git-submodule which depends on git-submodule.sh
doesn't depend on e.g. "submodule--helper" being built, so in that sense
this is inconsistent with the rest of our shellscripts.
But in the case of wrap-for-bin.sh its generation is driven by the
Makefile, and it's *only* there to to exec() the target binary (at least
some of those other *.sh's can serve up -h on their own).
And if we don't include that line, then (like on "master"):
$ make clean >/dev/null; make bin-wrappers/git; ./git; echo $?
GIT_VERSION = 2.38.GIT-dev
MKDIR -p bin-wrappers
GEN bin-wrappers/git
bash: ./git: No such file or directory
127
But *shrug*, I just don't see how it's useful, when it's so easy to make
it do something useful.
1. https://lore.kernel.org/git/cover-v2-0.3-00000000000-20221026T143533Z-avarab@gmail.com/
next prev parent reply other threads:[~2022-11-01 1:55 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 16:02 [PATCH 0/8] scalar: integrate into core Git Victoria Dye via GitGitGadget
2022-08-31 16:02 ` [PATCH 1/8] scalar: fix command documentation section header Victoria Dye via GitGitGadget
2022-08-31 16:02 ` [PATCH 2/8] scalar: include in standard Git build & installation Victoria Dye via GitGitGadget
2022-09-01 9:11 ` Johannes Schindelin
2022-09-01 13:17 ` [PATCH 0/5] Makefile: split up $(test_bindir_programs) Ævar Arnfjörð Bjarmason
2022-09-01 13:17 ` [PATCH 1/5] Makefile: factor sed-powered '#!/bin/sh' munging into a variable Ævar Arnfjörð Bjarmason
2022-09-01 13:17 ` [PATCH 2/5] Makefile: define "TEST_{PROGRAM,OBJS}" variables earlier Ævar Arnfjörð Bjarmason
2022-09-01 13:17 ` [PATCH 3/5] Makefile: simplify $(test_bindir_programs) rule by splitting it up Ævar Arnfjörð Bjarmason
2022-09-01 13:17 ` [PATCH 4/5] Makefile: define bin-wrappers/% rules with a template Ævar Arnfjörð Bjarmason
2022-09-01 13:17 ` [PATCH 5/5] Makefile: fix "make clean && make bin-wrappers/$NAME" dependencies Ævar Arnfjörð Bjarmason
2022-09-01 15:02 ` [PATCH 0/5] Makefile: split up $(test_bindir_programs) Derrick Stolee
2022-09-02 12:38 ` Johannes Schindelin
2022-10-26 14:42 ` [PATCH v2 0/3] Makefile: fix issues with bin-wrappers/% rule Ævar Arnfjörð Bjarmason
2022-10-26 14:42 ` [PATCH v2 1/3] Makefile: factor sed-powered '#!/bin/sh' munging into a variable Ævar Arnfjörð Bjarmason
2022-10-26 17:51 ` Junio C Hamano
2022-10-26 14:42 ` [PATCH v2 2/3] Makefile: define "TEST_{PROGRAM,OBJS}" variables earlier Ævar Arnfjörð Bjarmason
2022-10-26 16:47 ` Junio C Hamano
2022-10-26 18:47 ` Ævar Arnfjörð Bjarmason
2022-10-26 19:13 ` Junio C Hamano
2022-10-26 14:42 ` [PATCH v2 3/3] Makefile: simplify $(test_bindir_programs) rule by splitting it up Ævar Arnfjörð Bjarmason
2022-10-26 18:48 ` Junio C Hamano
2022-10-26 19:14 ` Ævar Arnfjörð Bjarmason
2022-10-26 20:28 ` Junio C Hamano
2022-10-26 20:43 ` Ævar Arnfjörð Bjarmason
2022-10-28 0:57 ` [PATCH v2 0/3] Makefile: fix issues with bin-wrappers/% rule Jeff King
2022-10-28 3:03 ` Ævar Arnfjörð Bjarmason
2022-10-31 22:28 ` [PATCH v3 0/4] Makefile: untangle bin-wrappers/% rule complexity Ævar Arnfjörð Bjarmason
2022-10-31 22:28 ` [PATCH v3 1/4] Makefile: factor sed-powered '#!/bin/sh' munging into a variable Ævar Arnfjörð Bjarmason
2022-10-31 22:28 ` [PATCH v3 2/4] Makefile: define "TEST_{PROGRAM,OBJS}" variables earlier Ævar Arnfjörð Bjarmason
2022-10-31 22:28 ` [PATCH v3 3/4] Makefile: rename "test_bindir_programs" variable, pre-declare Ævar Arnfjörð Bjarmason
2022-10-31 22:28 ` [PATCH v3 4/4] Makefile: simplify $(test_bindir_programs) rule by splitting it up Ævar Arnfjörð Bjarmason
2022-10-31 23:54 ` [PATCH v3 0/4] Makefile: untangle bin-wrappers/% rule complexity Taylor Blau
2022-11-01 1:29 ` Ævar Arnfjörð Bjarmason [this message]
2022-08-31 16:02 ` [PATCH 3/8] git help: special-case `scalar` Johannes Schindelin via GitGitGadget
2022-08-31 16:02 ` [PATCH 4/8] scalar: implement the `help` subcommand Johannes Schindelin via GitGitGadget
2022-08-31 16:48 ` Ævar Arnfjörð Bjarmason
2022-09-01 16:08 ` Victoria Dye
2022-09-01 8:51 ` Johannes Schindelin
2022-09-01 9:17 ` Johannes Schindelin
2022-08-31 16:02 ` [PATCH 5/8] scalar-clone: add test coverage Victoria Dye via GitGitGadget
2022-09-01 9:32 ` Johannes Schindelin
2022-09-01 23:49 ` Victoria Dye
2022-09-02 9:07 ` Johannes Schindelin
2022-09-02 16:52 ` Junio C Hamano
2022-08-31 16:02 ` [PATCH 6/8] t/perf: add Scalar performance tests Victoria Dye via GitGitGadget
2022-09-01 9:39 ` Johannes Schindelin
2022-09-01 16:15 ` Victoria Dye
2022-09-01 16:21 ` Victoria Dye
2022-09-02 9:16 ` Johannes Schindelin
2022-09-01 16:43 ` Junio C Hamano
2022-08-31 16:02 ` [PATCH 7/8] t/perf: add 'GIT_PERF_USE_SCALAR' run option Victoria Dye via GitGitGadget
2022-09-01 9:43 ` Johannes Schindelin
2022-09-02 4:00 ` Victoria Dye
2022-09-02 9:17 ` Johannes Schindelin
2022-08-31 16:02 ` [PATCH 8/8] Documentation/technical: include Scalar technical doc Victoria Dye via GitGitGadget
2022-08-31 17:03 ` [PATCH 0/8] scalar: integrate into core Git Ævar Arnfjörð Bjarmason
2022-08-31 18:42 ` Victoria Dye
2022-09-01 9:56 ` Johannes Schindelin
2022-09-02 15:56 ` [PATCH v2 0/9] " Victoria Dye via GitGitGadget
2022-09-02 15:56 ` [PATCH v2 1/9] scalar: fix command documentation section header Victoria Dye via GitGitGadget
2022-09-02 15:56 ` [PATCH v2 2/9] scalar: include in standard Git build & installation Victoria Dye via GitGitGadget
2022-09-02 15:56 ` [PATCH v2 3/9] git help: special-case `scalar` Johannes Schindelin via GitGitGadget
2022-09-02 15:56 ` [PATCH v2 4/9] scalar: implement the `help` subcommand Johannes Schindelin via GitGitGadget
2022-09-02 15:56 ` [PATCH v2 5/9] scalar: add to 'git help -a' command list Victoria Dye via GitGitGadget
2022-09-02 15:56 ` [PATCH v2 6/9] scalar-clone: add test coverage Victoria Dye via GitGitGadget
2022-09-02 15:56 ` [PATCH v2 7/9] t/perf: add Scalar performance tests Victoria Dye via GitGitGadget
2022-09-02 15:56 ` [PATCH v2 8/9] t/perf: add 'GIT_PERF_USE_SCALAR' run option Victoria Dye via GitGitGadget
2022-09-02 15:56 ` [PATCH v2 9/9] Documentation/technical: include Scalar technical doc Victoria Dye via GitGitGadget
2022-09-05 10:36 ` [PATCH v2 0/9] scalar: integrate into core Git Johannes Schindelin
2022-09-08 20:54 ` Derrick Stolee
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=221101.86edun5tgn.gmgdl@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.com \
--cc=vdye@github.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.
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).