[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: do PHONY targets guarantee an order on dependency processing?
From: |
Robert P. J. Day |
Subject: |
Re: do PHONY targets guarantee an order on dependency processing? |
Date: |
Sun, 12 Feb 2006 05:28:49 -0500 (EST) |
On Sat, 11 Feb 2006, Paul D. Smith wrote:
> %% "Robert P. J. Day" <address@hidden> writes:
>
> rpjd> $(Program): build_msg ... other targets ...
> rpjd> ...
> rpjd> .PHONY: build_msg
> rpjd> build_msg:
> rpjd> @printf blah blah
>
> rpjd> below this snippet, it reads:
>
> rpjd> "Because the printf is in a phony target, the message is printed
> rpjd> immediately before any prerequisites are updated."
>
> rpjd> really? i thought there was no way to guarantee the order of
> rpjd> dependency processing. are phony targets special in this
> rpjd> respect? or is the book just wrong?
>
> If you run make without -j, then prerequisites are guaranteed to be
> updated in the order in which they appear.
really? i could swear that i've seen *numerous* postings here stating
that make doesn't guarantee the processing order of a rule's
prerequisites. and even checking the web is guaranteed to produce
confilcting information.
for instance,
http://www.linuxdevcenter.com/pub/a/linux/2002/01/31/make_intro.html
states:
"Make can run the prerequisites in any order." [By "run," i assume
the author means "process."]
yet here, http://www.opengroup.org/onlinepubs/007908799/xcu/make.html,
you read:
"The make utility treats all prerequisites as targets themselves and
recursively ensures that they are up-to-date, processing them in the
order in which they appear in the rule."
i'm confused.
rday