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

 

后文待续

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值