[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: simple assignment of target-specific variables
From: |
Dmitry Goncharov |
Subject: |
Re: simple assignment of target-specific variables |
Date: |
Tue, 9 Jun 2020 12:05:45 -0400 |
On Tue, Jun 9, 2020 at 9:46 AM Edward Welbourne <edward.welbourne@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