GNU make manual 翻译(八)

继续翻译

2.1 What a Rule Looks Like    
==========================    
    
A simple makefile consists of "rules" with the following shape:    
    
     TARGET ... : PREREQUISITES ...    
             RECIPE    
             ...    
             ...    
    
   A "target" is usually the name of a file that is generated by a    
program; examples of targets are executable or object files.  A target    
can also be the name of an action to carry out, such as `clean' (*note    
Phony Targets::).    
    
   A "prerequisite" is a file that is used as input to create the    
target.  A target often depends on several files.    

2.1 规则长什么样

一个简单的makefile 由如下的规则组成:

目的... :  前提条件 ...

         片段

          ...

          ...

一个目的是一个 文件的名字,此文件由某个程序生成。

目的的例子如 可执行文件 或者 目标文件。

目的也可以是 动作的名称 ,比如 clean (*note Phony Targets (伪目标))

一个前提条件是 一个文件名字,此文件被用作输入以产生目的。目的常常依赖于几种文件。

后文待续

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