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
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make