makefilevpath

What does the V in vpath stand for?


The VPATH variable in makefile is used to indicate search paths. But what exactly does the "V" in it stand for?

The value of the make variable VPATH specifies a list of directories that make should search. Most often, the directories are expected to contain prerequisite files that are not in the current directory; however, make uses VPATH as a search list for both prerequisites and targets of rules.


Solution

  • VPATH seems to be: virtual path

    I found this link about: gcc_make

    Which defines VPATH like this:

    >**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
    

    This second link confirm that:

    VPATH stands for Virtual path