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中被改变的内容。

 

后文待续

posted @ 2012-09-14 15:34  健哥的数据花园  阅读(223)  评论(0编辑  收藏  举报