[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Idea: Allow certain special targets as dependencies

From: Masahiro Yamada
Subject: Re: Idea: Allow certain special targets as dependencies
Date: Mon, 10 Jun 2019 12:44:50 +0900

On Mon, Jun 10, 2019 at 10:38 AM Paul Smith <address@hidden> wrote:
> On Sun, 2019-06-09 at 18:46 -0400, David A. Wheeler wrote:
> > As syntactic sugar,
> > I'd like to see selected special targets allowed as dependencies.
> > When this happens, it's the same thing as if the target was listed
> > as a dependency of the special target. E.g., you could express
> > the same thing above as:
> >
> > all: .PHONY do-this do-that
> That's a cool idea.  I can't think of any issues with it.

Just talking about Linux Makefiles,
we need to duplicate phony targets anyway
since phony targets are assigned to a variable 'PHONY'.

For example, like this

(BTW, I think this idea was provided by Paul.)

Besides, this might be an unrelated topic,
is it a good idea to support .PHONY for pattern rules?

We cannot write like this:

.PHONY: %config

Linux Makefiles use 'FORCE' as an alternative solution.  See

'FORCE' is an idiom used in Linux Makefiles
to run the target forcibly, but
I think it is slightly different from .PHONY.

Best Regards
Masahiro Yamada

reply via email to

[Prev in Thread] Current Thread [Next in Thread]