help-make
[Top][All Lists]
Advanced

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

Re: The explanation of order-only prerequisites is not clear


From: ali hagigat
Subject: Re: The explanation of order-only prerequisites is not clear
Date: Sun, 12 Sep 2010 09:06:10 +0430

The only sentence which explains order-only prerequisites is this:

"Occasionally, however, you have a situation where you want to impose
a specific ordering
on the rules to be invoked without forcing the target to be updated if
one of those rules is
executed."

a specific ordering on what rules? Suppose, we have a rule in a
makefile and that rule has a target and some prerequisites. And those
prerequisites have their own rules. When you talk about a specific
order on rules, do you mean the rules of these prerequisites?
Or you mean some unrelated independent rules in a makefile?
What ordering mean? Does it mean they are executed first?

What "without forcing the target to be updated" mean? You mean the
recipe of that target will not be executed?

Paul Smith wrote: "..and nowhere in there does it talk about pipe
symbols at all..."
"Order-only prerequisites can be specified by placing a pipe symbol
(|) in the prerequisites list..."
I copied one line of the make manual. You have not mentioned the pipe symbol?


On Wed, Sep 8, 2010 at 5:38 PM, Paul Smith <address@hidden> wrote:

>> 1) If I specify  an order-only prerequisite, will be evaluated sooner
>> than other normal prerequisites?
>
> No.  Why would it?
>
>> 2) Instead of "target to be updated" you could say, the command or
>> recipe of the target which is to be executed" as follows:
>>
>> If a target has an order-only prerequisite and that order-only
>> prerequisite is a file(or directory) and it is updated(because it may
>> be the target of some other rule itself), the command or recipe of
>> that target will not be executed.
>> Did i understand the purpose of the order-only prerequisite?
>> Is my sentence more clear than the manual?!!
>
> First, this is not more clear than the manual.  For one small example,
> you say "if ... [the] order-only prerequisite is a file (or directory)".
> That implies it might NOT be a file or directory.  What's the
> alternative?  And what happens in that case?
>
> Second, it's flat-out wrong.  If an order-only prerequisite is updated
> that doesn't mean that the recipe of the target will not run: that would
> be silly.  Order-only prereqs are not some kind of "exclusive
> or" (either one or the other but not both), which is what your text here
> says.
>
> --
> -------------------------------------------------------------------------------
>  Paul D. Smith <address@hidden>          Find some GNU make tips at:
>  http://www.gnu.org                      http://make.mad-scientist.net
>  "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
>
>



reply via email to

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