GNU make manual 翻译(十九)

继续翻译

   After recompiling whichever object files need it, `make' decides  
whether to relink `edit'.  This must be done if the file `edit' does
not exist, or if any of the object files are newer than it.  If an 
object file was just recompiled, it is now newer than `edit', so `edit' 
is relinked.                          
                        
   Thus, if we change the file `insert.c' and run `make', `make' will 
compile that file to update `insert.o', and then link `edit'.  If we 
change the file `command.h' and run `make', `make' will recompile the 
object files `kbd.o', `command.o' and `files.o' and then link the file 
`edit'.                        

当重新编译了目标文件,make 会判断是否需要重新链接 edit.

如果 edit 尚不存在,则必须链接,或者某个新得到的 目标文件比 edit 心,也需要链接。

如果某目标文件刚被重新变异,它会比edit 新,所以 edit 会被重新链接。

 

因此,如果我们改变了 insert.c 然后运行 make, make 会编译此文件以更新 insert.o,

然后链接 edit。

如果我们改变了 command.h 然后运行 make , make 会 重新编译 kdo.o,command.o 和 files.o,然后链接文件 edit。

后文待续

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值