bug-make
[Top][All Lists]
Advanced

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

Re: Potential Bug: `.PHONY` targets and order-only prerequisites


From: Paul Smith
Subject: Re: Potential Bug: `.PHONY` targets and order-only prerequisites
Date: Tue, 17 May 2022 17:35:48 -0400
User-agent: Evolution 3.44.1 (by Flathub.org))

On Tue, 2022-05-17 at 17:20 -0400, Paul Smith wrote:
> this says two things: first, that b and c will both be rebuilt (if
> necessary) before a's recipe is started,

I guess I should be more clear about the "(if necessary)".  What I mean
is the same as if you had run "make b" or "make c" and make had decided
it needed to rebuild those targets.

In other words, the "if necessary" has nothing to do with "a" or
whether "a" needs to be rebuilt.  It only relates to "b" and "c" and
whether they need to be rebuilt, on their own.  If those targets don't
exist, or are phony, or they have prerequisites which cause them to be
out of date, they will be rebuilt.  If they exist, are not phony, and
have no prerequisites that cause them to be out of date, they will not
be rebuilt.

Once both "b" and "c" are completed, then make will decide whether "a"
needs to be rebuilt.  For that decision make will ignore any order-only
prerequisites and only consider the normal prerequisites.



reply via email to

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