2

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.

HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
richard.g
  • 3,585
  • 4
  • 16
  • 26

1 Answers1

3

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

Ilona
  • 357
  • 3
  • 10
HDJEMAI
  • 9,436
  • 46
  • 67
  • 93