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 文件。

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

则重新编译必须执行。

后文待续


本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/12/2682128.html,如需转载请自行联系原作者
目录
相关文章
|
Linux C语言
make: gcc:命令未找到
make: gcc:命令未找到
make: gcc:命令未找到
|
C语言 C++ Perl
如何处理错误消息Please install the gcc make perl packages
如何处理错误消息Please install the gcc make perl packages
144 0