GNU make manual 翻译(五十一)

简介:
继续翻译

复制代码
   When you use the `-t' or `--touch' option (*note Instead of 
Executing Recipes: Instead of Execution.), you would not want to use an
out-of-date makefile to decide which targets to touch.  So the `-t' 
option has no effect on updating makefiles; they are really updated 
even if `-t' is specified.  Likewise, `-q' (or `--question') and `-n' 
(or `--just-print') do not prevent updating of makefiles, because an 
out-of-date makefile would result in the wrong output for other targets.
Thus, `make -f mfile -n foo' will update `mfile', read it in, and then
print the recipe to update `foo' and its prerequisites without running
it.  The recipe printed for `foo' will be the one specified in the 
updated contents of `mfile'.                        
复制代码
 

当你使用 -t 或者 --touch 选项(*note Instead of Executing Recipes: Instead of Execution.)

你不会想用一个过期的 makefile 去定义touch 哪个 目的。

因此,-t 选项对 更改过期的 makefile无效。尽管-t选项被设定,这些过期的makefile仍然会被更新。

同样的, -q(或者 --question) 和 -n(或者 --just -print) 选项也不会禁止对makefile的更新,因为一个过期的 makefile会导致对其他的目的的错误输出结果。

所以,make -f mfile -n foo 会更改 mfile, 读取它,然后打印出更改 foo的片段和前提条件而不运行它。

被打印的与 foo相关的片段会是在 mfile中被改变的内容。

 

后文待续


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