GNU make manual 翻译(七十八)

简介:
继续翻译

复制代码
4.3 Types of Prerequisites                        
==========================                        
                        
There are actually two different types of prerequisites understood by GNU `make': normal prerequisites such as described in the previous section, and "order-only" prerequisites.  A normal prerequisite makes two statements: first, it imposes an order in which recipes will be invoked: the recipes for all prerequisites of a target will be completed before the recipe for the target is run.  Second, it imposes a dependency relationship: if any prerequisite is newer than the target, then the target is considered out-of-date and must be rebuilt. 
                        
   Normally, this is exactly what you want: if a target's prerequisite 
is updated, then the target should also be updated.                        
复制代码
4.3 前提条件的类型
==========================
GNU make 可以理解两种不同类型的前提条件:

前面章节中描述的普通的前提条件,以及 仅排序 前提条件。

一个普通的前提条件完成两件事:首先,它确立了一个顺序,片段被激活的时候要运用此顺序:

一个目的的所有前提条件都将被完成后,此目的的片段才会执行。

第二,它确立了一个依赖关系: 如果任何前提条件比目的新,则目的被认为已经过期,需要重新构建。

通常,这正是你所想要的:如果一个前提条件被修改了,那么目的也需要被修改。

 

后文待续


本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/18/2690756.html,如需转载请自行联系原作者
目录
相关文章
|
Linux C语言
make: gcc:命令未找到
make: gcc:命令未找到
make: gcc:命令未找到
|
编译器 Linux 开发工具
|
9月前
|
存储 编译器 C语言
深入理解GCC 和 G++ 编译器
GCC 和 G++ 是 GNU 工具链中的核心编译器,支持 C 和 C++ 程序开发。本文详细介绍其编译流程、常用选项及动态链接与静态链接的区别。编译过程分为预处理、编译、汇编和链接四个阶段,每个阶段有特定任务和命令选项。常用选项如 `-E`、`-S`、`-c` 和 `-o` 分别用于预处理、生成汇编代码、生成目标文件和指定输出文件。动态链接节省空间且易于更新,但依赖运行时库;静态链接独立高效,但文件较大且更新困难。合理选择优化选项(如 `-O0` 至 `-O3`)可提升程序性能。掌握这些知识有助于开发者更高效地编写、调试和优化代码。
455 23
深入理解GCC 和 G++ 编译器