help-make
[Top][All Lists]
Advanced

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

Re: still confused about "order-only" prerequisites


From: Noel Yap
Subject: Re: still confused about "order-only" prerequisites
Date: Tue, 01 Mar 2005 14:58:41 -0500
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

I tend to use it when I want the up-to-date check to check only if the 
dependency doesn't exist.  IOW, if the dependency exists, consider the rule to 
be up-to-date.

For example:

SOURCE := path/to/my/source
DESTINATION := path/to/my/destination

DESTINATION: $(SOURCE) | $(dirname $(DESTINATION))/.

%/.:
        mkdir -p $(@)


I've seen one example (although I don't recall it now) in which using the 
ordering feature was actually necessary, but IMHO, such things ought to be 
avoided and normal use of dependency rules ought to be preferred.

HTH,
Noel

Robert P. J. Day wrote:

  can someone give a practical example of "order-only" prerequisites?
i recall from once upon a time i asked about this sort of indirectly,
and the impression i got was that a lot of people really weren't quite
sure how these things worked.  and the online manual, while it gives
an overall, general explanation, doesn't supply an actual example to
clarify things.

  so ... any takers?  does anyone actually use these things in a
meaningful way?

rday


_______________________________________________
Help-make mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-make




reply via email to

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