GNU make manual 翻译( 一百零七)

简介:

继续翻译

复制代码
`.PRECIOUS'                        
     The targets which `.PRECIOUS' depends on are given the following special treatment: if `make' is killed or interrupted during the execution of their recipes, the target is not deleted.  *Note Interrupting or Killing `make': Interrupts.  Also, if the target is an intermediate file, it will not be deleted after it is no longer needed, as is normally done.  *Note Chains of Implicit Rules: Chained Rules.  In this latter respect it overlaps with the `.SECONDARY' special target.  
                        
     You can also list the target pattern of an implicit rule (such as `%.o') as a prerequisite file of the special target `.PRECIOUS' to preserve intermediate files created by rules whose target patterns match that file's name.                                                
`.INTERMEDIATE'                        
     The targets which `.INTERMEDIATE' depends on are treated as intermediate files.  *Note Chains of Implicit Rules: Chained Rules. `.INTERMEDIATE' with no prerequisites has no effect.                        
复制代码

`.PRECIOUS' 
 那些 .PRECIOUS 所依赖的目的将得到特殊对待:如果 make在执行过程中 被杀掉或者中断,此目的不会被删除。

*Note Interrupting or Killing `make': Interrupts.

并且,如果目的是一个中间文件,当它不再被需要时,也不会被删除。 *Note Chains of Implicit Rules: Chained Rules. 它和后面的 .SECONDARY 特殊目的有些重复。

你也可以列出某隐式规则的目的模式(比如 %.o), 来作为 特殊目的.PRECIOUS的前提条件文件,来保护那些符合模式的中间文件。 

.INTERMEDIATE

.INTERMEDIATE 目的所依赖的目的被当作中间文件。

*Note Chains of Implicit Rules: Chained Rules.没有前提条件的 .INTERMEDIATE 没有效果。

后文待续





本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/21/2696742.html,如需转载请自行联系原作者

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