Re: [PATCH v2 3/3] Makefile: simplify $(test_bindir_programs) rule by splitting it up
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 26, 2022, 20:28 UTC
- Message-ID
- <xmqq5yg6gwhs.fsf@gitster.g>
- In-Reply-To
- <221026.86tu3qbd03.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> Are you asking if "define"'s execute in some context outside the purview > of rules, so that if you $(call) one from within a rule and it errors, > that we won't clean up the file?
Not at all.
I was wondering why the defined sequance does not end in
... <$> >$@+ && \ chmod +x $@+ && \ mv $@+ $@
like many other command sequences in the Makefile. As I said, I did remember we had discussed delete-on-error; I just didn't recall if we do depend on it already.
Show 10 quoted lines
> I can drop them, FWIW I've found it quite handy to add these to ad-hoc > debug templates. E.g. you can run: > > $ make -f /dev/null -E '$(eval $(file <Makefile))' -E '$(error $(call bin_wrappers_template,a,b,c,d))' > make: *** > ## bin_wrappers_template > # 1 = a > # 2 = b > # 3 = c > # 4 = d
OK. That use pattern was what I was missing.
Show 5 quoted lines
> ... > So you see what the parameters expand to. Maybe just changing the > heading to: > > ## bin_wrappers_template: $(1..N) below for manual "$(error $(call ..." deubgging
Yeah, it would be totally useless without such an instruction.