On Tue, Jun 9, 2020 at 9:46 AM Edward Welbourne <edward.welbou...@qt.io> wrote:
> I presume the workaround is
>
> TGTDATE := $(shell date)
> $(TARGETS): DATE := $(TGTDATE)
>
> at the slightly annoying price of calling the command once even if
> making some target *not* in the TARGETS list.

It is possible to avoid this price with
ifeq ($(findstring aa,$(MAKECMDGOALS)),aa)
dt:=$(shell set -x; date)
endif

regards, Dmitry

  • simple assign... David Boyce
    • Re: simp... Edward Welbourne
      • Re: ... Dmitry Goncharov via Bug reports and discussion for GNU make
    • Re: simp... Dmitry Goncharov via Bug reports and discussion for GNU make
      • Re: ... David Boyce
        • ... Dmitry Goncharov via Bug reports and discussion for GNU make
          • ... David Boyce
            • ... Dmitry Goncharov via Bug reports and discussion for GNU make

Reply via email to