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 没有效果。

后文待续

posted @ 2012-09-21 13:57  健哥的数据花园  阅读(300)  评论(0编辑  收藏  举报