Hi Ævar, On Thu, 1 Sep 2022, Ævar Arnfjörð Bjarmason wrote: > On Thu, Sep 01 2022, Johannes Schindelin wrote: > > > [...] > > On Wed, 31 Aug 2022, Victoria Dye via GitGitGadget wrote: > > [...] > >> @@ -3062,7 +3067,7 @@ bin-wrappers/%: wrap-for-bin.sh > >> $(call mkdir_p_parent_template) > >> $(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ > >> -e 's|@@BUILD_DIR@@|$(shell pwd)|' \ > >> - -e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%$(X),$(@F))$(patsubst git%,$(X),$(filter $(@F),$(BINDIR_PROGRAMS_NEED_X)))|' < $< > $@ && \ > >> + -e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%,$(@F))$(if $(filter-out $(BINDIR_PROGRAMS_NO_X),$(@F)),$(X),)|' < $< > $@ && \ > > > > It took me a good while to wrap my head around this (and let me be clear: > > I consider none of this your fault, it's the fault of the design of the > > Makefile syntax). > > > > Let me untangle this, for posterity's benefit. We substitute the > > placeholder `@@PROG@@` with a concatenation of two strings that are both > > derived from `@F`, i.e. the basename of the to-be-wrapped command. > > We could do this later, [... something about touching the same code ...] Yes, and we should. It would be better if we kept the focus on Scalar in this mail thread, to get it done first. It is the stated preference in this project anyway to avoid working on the code that is already being worked on in other in-flight patch series, to reduce unnecessary friction. Ciao, Johannes