GNU make manual 翻译(十)

本文深入解析Makefile中如何定义规则来指定如何及何时重新生成特定目标文件,以及规则如何通过依赖项执行操作。了解简单与复杂规则的编写方式,提升自动化构建与管理效率。

继续翻译

   A "rule", then, explains how and when to remake certain files which    
are the targets of the particular rule.  `make' carries out the recipe    
on the prerequisites to create or update the target.  A rule can also    
explain how and when to carry out an action.  *Note Writing Rules:    
Rules.    
    
   A makefile may contain other text besides rules, but a simple    
makefile need only contain rules.  Rules may look somewhat more    
complicated than shown in this template, but all fit the pattern more    
or less.    

规则,解释如何以及何时去重新生成特定的文件。这些文件是特定规则的目的。

make 执行 前提条件中的片段 去创建或改变 目的。

规则也可以解释 如何以及何时去执行一个动作。 *Note Writing Rules(写规则)

 

在规则之外,一个makefile也可以包含其他文本,但是一个简单的makefile仅仅需要特定的规则。

规则可以看起来比这个模板里的更加复杂,但是都需要符合上述的模式。

后文待续

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值