GNU make manual 翻译(四十二)

继续翻译

   When `make' processes an `include' directive, it suspends reading of  
the containing makefile and reads from each listed file in turn.  When 
that is finished, `make' resumes reading the makefile in which the 
directive appears.                        
                        
   One occasion for using `include' directives is when several programs, 
handled by individual makefiles in various directories, need to use a 
common set of variable definitions (*note Setting Variables: Setting.) 
or pattern rules (*note Defining and Redefining Pattern Rules: Pattern  
Rules.).                        

当 make 执行 include 指令的时候,它挂起对现有makefile文件后继内容的读取,去读取每一个列举出来的文件,当这个动作执行完毕后,它再次开始从 makefile后继内容开始读取。

有一种使用 'include'的场景是,当几个程序被 几个独立的 makefile在各个的目录中处理,它们需要使用一个套共同的变量定义集合 (*note Setting Variables:Setting.) 或者模式规则(*note Defining and Redefining Pattern Rules: Pattern Rules.)

后文待续

你可能感兴趣的:(Make)