GNU make manual 翻译(十七)

继续翻译

   Thus, when you give the command:    
    
     make    
    
`make' reads the makefile in the current directory and begins by    
processing the first rule.  In the example, this rule is for relinking    
`edit'; but before `make' can fully process this rule, it must process    
the rules for the files that `edit' depends on, which in this case are    
the object files.  Each of these files is processed according to its    
own rule.  These rules say to update each `.o' file by compiling its    
source file.  The recompilation must be done if the source file, or any    
of the header files named as prerequisites, is more recent than the    
object file, or if the object file does not exist.    

因此,当你执行命令:

  make

make 当前目录下的 makefile文件,开始处理第一条规则。

在这个例子里面,这个规则就是 再链接 edit; 但是在 make 可以完整处理此规则前,

它必须处理 edit 所依赖的文件对应的规则。

这些个文件按照各自所对应的规则被处理。

这些规则要求 通过重新编译 源文件来 更改 各自的 .o 文件。

如果 作为 前提条件的 源代码文件或者头文件 比目标文件新,或者 目标文件还不存在,

则重新编译必须执行。

后文待续

你可能感兴趣的:(Make)