GNU make manual 翻译(五十三)
继续翻译
3.6 Overriding Part of Another Makefile ======================================= Sometimes it is useful to have a makefile that is mostly just like another makefile. You can often use the `include' directive to include one in the other, and add more targets or variable definitions. However, it is illegal for two makefiles to give different recipes for the same target. But there is another way. In the containing makefile (the one that wants to include the other), you can use a match-anything pattern rule to say that to remake any target that cannot be made from the information in the containing makefile, `make' should look in another makefile. *Note Pattern Rules::, for more information on pattern rules.
3.6 覆盖另一个makefile的部分内容
有时拥有另一个makefile是很有用的。你经常可以采用 include 指令来包含一个makefile到另一个makefile 中,也可以最佳更多的目的或变量定义。但是你不能给同样的一个目的不同的片段,这是不被允许的,不过,还有另一个办法。
在包含其他makefile文件的makefile中,你可以使用一个 匹配-任何的模式规则来说明,重新编译任何一个无法用在此makefile中的信息来生成的 目的文件, 这样make 将会去到其他的makefile中寻找。
*Note Pattern Rules::
后文待续