GNU make manual 翻译(五十七)

继续翻译

   It's important to understand this two-phase approach because it has a direct impact on how variable and function expansion happens; this is often a source of some confusion when writing makefiles.  Here we will present a summary of the phases in which expansion happens for different  constructs within the makefile.  We say that expansion is "immediate"if it happens during the first phase: in this case `make' will expand any variables or functions in that section of a construct as the
makefile is parsed.  We say that expansion is "deferred" if expansion is not performed immediately.  Expansion of a deferred construct is not performed until either the construct appears later in an immediate context, or until the second phase.
                        
   You may not be familiar with some of these constructs yet.  You can reference this section as you become familiar with them, in later                        
chapters.                        

理解这两个阶段,是十分重要的,因为它对变量和函数如何展开有直接的影响。这常常是写makefile时造成困扰的源头。这里我们将要对这两个阶段给出一个关于扩展(变量和函数)的总结。

我们说,在第一阶段,扩展是立即发生的:在这种情形下,make分析makefile时,在构建的时候, 要展开所有变量和函数。我们说如果扩展不是立即执行,那么这种扩展将被推迟。

对一个推迟性的构造,扩展不会发生,直到此构造出现在一个立即性的上下文中的时候,或者直到第二个阶段。

 

也许你还太熟悉某些构造。你可以在后面的章节中,后来参照此节。

后文待续

你可能感兴趣的:(Make)