By default, the order of execution is the same as specified in the prerequisites list, unless there are any dependencies defined between these prerequisites.
abc: x y z
The order is x y z
.
abc: x y z
y : z
The order would be x z y
.
But ideally, you should design your Makefiles so that it wouldn't rely on the order in which prerequisites are specified. That is, if y
should be executed after z
, there must be a y : z
dependence.
And keep in mind that GNU Make can execute some recipes in parallel, see Mat's answer.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…