makefile中的VPATH
变量用于指示搜索路径。但是它中的“V”究竟代表什么呢?
make变量VPATH的值指定应搜索的目录列表。通常,目录应包含不在当前目录中的必备文件;但是,make使用VPATH作为规则的先决条件和目标的搜索列表。
答案 0 :(得分:1)
VPATH似乎是:虚拟路径
我发现此链接有关:gcc_make
这样定义了VPATH:
>**Virtual Path - VPATH & vpath**
>You can use VPATH (uppercase) to specify the directory to search for dependencies and target files. For example,
># Search for dependencies and targets from "src" and "include" directories
># The directories are separated by space
VPATH = src include
>You can also use vpath (lowercase) to be more precise about the file type and its search directory. For example,
># Search for .c files in "src" directory; .h files in "include" directory
># The pattern matching character '%' matches filename without the extension
>vpath %.c src
>vpath %.h include
此second link确认:
VPATH代表虚拟路径