GNU make manual 翻译(七十一)

简介:
继续翻译

 

复制代码
Secondary Expansion of Implicit Rules                        
-------------------------------------                        
                        
As `make' searches for an implicit rule, it substitutes the stem and then performs secondary expansion for every rule with a matching target pattern.  The value of the automatic variables is derived in the same fashion as for static pattern rules.  As an example:                           
     .SECONDEXPANSION:                     
                        
     foo: bar         
     foo foz: fo%: bo%  
     %oo: <
^ +
*                        
                        
   When the implicit rule is tried for target `foo', `<expandstobar,
^' expands to `bar boo', `+alsoexpandstobarboo,and
*' expands to `f'.                        
复制代码
对隐式规则的二次扩展

当 make 搜寻一条 隐式规则,它替换枝干部分,并对每一条符合目的模式的规则进行二次扩展。

自动变量的值也像静态模式规则那样被推导处理。

例如:

.SECONDEXPANSION: 

foo: bar

foo foz: fo%: bo%

%oo: <
^ +
*

 

当隐式规则用于目的 foo时,<bar,
^ 扩展为 bar boo, +barboo
*扩展为 f。

后文待续


本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/18/2690000.html,如需转载请自行联系原作者
目录
打赏
0
0
0
0
60
分享
相关文章
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等