[Top][All Lists]

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

Re: Idea: Standard way to negate special targets

From: David A. Wheeler
Subject: Re: Idea: Standard way to negate special targets
Date: Wed, 12 Jun 2019 12:25:18 -0400 (EDT)

On Wed, 12 Jun 2019 11:59:50 -0400, Paul Smith <address@hidden> wrote:
> There's already too much whitespace-awareness in make as is IMO :).


> That's why I suggested embedding the "!" in the target name but if
> people don't like that, then we should just document that the "!" binds
> to the next target and leave it at that IMO.

I think modifying names is lousy in general.
In addition, there's no obvious way to generalize that to prerequisites in 
Being able to remove prerequisites seems like something that
should be rarely used, but very useful when it is needed.
In particular, that'd simplify reusing generalized
makefiles that are *almost* what you want.

I would strongly prefer "!" just binding to the next target & documenting that.
The first time someone sees they may wonder how far it binds,
but it's pretty obvious that there are multiple possibilities,
so they can look it up once & remember the answer from then on. Also,
people can choose to list negations at the end of the list of
prerequisites, and that style seems adequate:

my-weird-target: foo bar ! .ONESHELL ! dont-want-to-depend-on-this

--- David A. Wheeler

reply via email to

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