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:: 

 

后文待续


本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/14/2685167.html,如需转载请自行联系原作者
目录
相关文章
|
Linux C语言
make: gcc:命令未找到
make: gcc:命令未找到
make: gcc:命令未找到
|
C语言 C++ Perl
如何处理错误消息Please install the gcc make perl packages
如何处理错误消息Please install the gcc make perl packages
148 0