GNU make manual 翻译(五十五)

简介:
继续翻译

复制代码
   The way this works is that the pattern rule has a pattern of just 
`%', so it matches any target whatever.  The rule specifies a 
prerequisite `force', to guarantee that the recipe will be run even if 
the target file already exists.  We give the `force' target an empty 
recipe to prevent `make' from searching for an implicit rule to build
it--otherwise it would apply the same match-anything rule to `force' 
itself and create a prerequisite loop!                        
复制代码
它工作的方式是因为 模式规则有一个 %模式,一次可以匹配任何目的。

这个规则指定了一个前提条件 force,表明了既使目的文件已经存在,它的片段也会运行。

我们给了 forcce 目的一个空的片段,用来防止 make 寻找一个隐式规则来生成自己-- 否则它就会应用这个匹配任何状况的规则来强迫自己产生 前提条件循环!

后文待续


本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/17/2688202.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
144 0