GNU make manual 翻译(十四)

本文介绍了Makefile中片段的基本用法,包括如何定义及执行片段。解释了使用tab字符作为片段前缀的重要性,并强调了make工具如何依据片段更新目标文件。
继续翻译

复制代码
   A recipe may follow each line that contains a target and    
prerequisites.  These recipes say how to update the target file.  A tab    
character (or whatever character is specified by the `.RECIPEPREFIX'    
variable; *note Special Variables::) must come at the beginning of    
every line in the recipe to distinguish recipes from other lines in the    
makefile.  (Bear in mind that `make' does not know anything about how    
the recipes work.  It is up to you to supply recipes that will update    
the target file properly.  All `make' does is execute the recipe you    
have specified when the target file needs to be updated.)      
复制代码
一个片段可以跟在一个目标和前提条件 系列之后

这些歌片段指出 如何改变目标 的文件。

一个 tab 符(或者如果.RECIPEPREFIX变量指定的其他符号)必须出现在片段所在行的起始处,

以区分片段行和其他的行。

必须意识到,make 本身并不清楚片段如何工作。这是由你来决定,使得片段可以正确地生成目的文件。

make 所作的所有的事情,就是 当目的文件需要被改变时,执行你所指定的片段。

后文继续


本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/12/2681954.html,如需转载请自行联系原作者
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值