GNU make manual 翻译(六十三)

简介:
继续翻译

   After the first expansion phase the prerequisites list of the 'myfile' target will be `onefile' and `$(TWOVAR)'; the first (unescaped) variable reference to ONEVAR is expanded, while the second (escaped) variable reference is simply unescaped, without being recognized as a variable reference.  Now during the secondary expansion the first word is expanded again but since it contains no variable or function references it remains the static value `onefile', while the second word is now a normal reference to the variable TWOVAR, which is expanded to the value `twofile'.  The final result is that there are  two prerequisites, `onefile' and `twofile'. 
 当第一次的扩展阶段结束后,myfile 目的会是:onefile  $(TWOVAR)

对第一个变量 ONEVAR 的反转义,进行了扩展,

然而,对跌入个变量仅仅是进行了一次反转义,并没有人为它就是一个变量参照。

现在,在二次扩展中,第一个词(onefile)依然会被扩展,但是它已不含有变量或者函数参照,所以它保持为静态的 onefile。 而跌入个但是现在是一个正常的,对变量 TWOVAR 的参照了,它会被扩展为 twofile。

最后的结果是,出现两个前提条件: onefile 和 twofile。 

后文待续


本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/09/17/2688413.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