GNU make manual 翻译( 一百二十一)
继续翻译
4.13 Double-Colon Rules ======================= Double-colon rules are explicit rules written with `::' instead of `:' after the target names. They are handled differently from ordinary rules when the same target appears in more than one rule. Pattern rules with double-colons have an entirely different meaning (*note Match-Anything Rules::). When a target appears in multiple rules, all the rules must be the same type: all ordinary, or all double-colon. If they are double-colon, each of them is independent of the others. Each double-colon rule's recipe is executed if the target is older than any prerequisites of that rule. If there are no prerequisites for that rule, its recipe is always executed (even if the target already exists). This can result in executing none, any, or all of the double-colon rules. Double-colon rules with the same target are in fact completely separate from one another. Each double-colon rule is processed individually, just as rules with different targets are processed.
4.13 双冒号规则
=======================
双冒号规则是在目的名字后用::代替 : 的显式规则。它们和普通规则被处理的方式不一样,同样的目的在不同的规则中多次出现。带有双冒号的模式规则有着完全不同的含义(*note Match-Anything Rules)。
当目的出现在多个规则中的时候,所有的规则必须是同样的类型,要么都是普通,要么都是双冒号。如果目的比其所在地的规则的前提条件陈旧,则此个双冒号规则的片段总是要被执行(既使目的已经存在)。这可能导致双冒好规则被执行若干次。
拥有同样目的的双冒号规则事实上是彼此完全分隔开的。每一个双冒号规则都单独执行,就像拥有不同目的的规则一样。
后文待续