Answer by John Henckel for Makefiles: What is an order-only prerequisite?
Suppose you have a Makefile like thisbaby: love touch $@love: touch $@then make says,touch lovetouch babynow you rm love and again make saytouch lovetouch babybecause in order to make baby you must...
View ArticleAnswer by MadScientist for Makefiles: What is an order-only prerequisite?
I think the documentation does describe how they behave. It describes how a normal prerequisite behaves:A normal prerequisite makes two statements: first, it imposes an order in which recipes will be...
View ArticleAnswer by Matt for Makefiles: What is an order-only prerequisite?
First, let's recall what the ordinary prerequisites are.Basically, the prerequisites in Makefile have two functions:They are checked and, if necessary, are built before the targetIf any of the...
View ArticleMakefiles: What is an order-only prerequisite?
The GNU make manual introduces order-only prerequisites:target: prerequisite1 prerequisite2 | orderonlyprerequisite1 orderonlyprerequisite2However, while that manual page gives an example and describes...
View ArticleAnswer by D. Peschel for Makefiles: What is an order-only prerequisite?
Others have already quoted the GNU make manual and given example Makefiles. I'd like to add two situations that benefit from order-only prerequisites.First, directories as targets. You want to create a...
View Article