GNU make manual 翻译(九十二)

简介:
继续翻译

复制代码
   If several `vpath' patterns match the prerequisite file's name, then `make' processes each matching `vpath' directive one by one, searching all the directories mentioned in each directive.  `make' handles multiple `vpath' directives in the order in which they appear in the makefile; multiple directives with the same pattern are independent of each other.        
        
   Thus,        
        
     vpath %.c foo        
     vpath %   blish        
     vpath %.c bar        
        
will look for a file ending in `.c' in `foo', then `blish', then `bar',        
while        
        
     vpath %.c foo:bar        
     vpath %   blish        
        
will look for a file ending in `.c' in `foo', then `bar', then `blish'.        
复制代码
如果有几个 vpath 模式匹配前提条件文件名,那么make 会一个接一个地处理每个 vpath 指令,搜索每一个指令中提到的目录。make 按照多个 vpath 指令在makefile 中出现的顺序处理 vpath 指令;拥有相同模式的 指令也彼此独立。  


vpath %.c foo
vpath % blish
vpath %.c bar

将要寻找 foo目录中 以 .c 结尾的文件,然后是blish 目录, 然后是 bar目录。

vpath %.c foo:bar
vpath % blish

将寻找 foo,bar blish 目录中的 以.c 结尾的文件。

 

后文待续


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