This section describes the environment variables that affect how CPP operates. You can use them to specify directories or prefixes to use when searching for include files, or to control dependency output.
Note that you can also specify places to search using options such as
-I, and control dependency output with options like
-M (see Invocation). These take precedence over
environment variables, which in turn take precedence over the
configuration of GCC.
PATH, in which to look for header files. The special character,
PATH_SEPARATOR, is target-dependent and determined at GCC build time. For Windows-based targets it is a semicolon, and for almost all other targets it is a colon.
CPATH specifies a list of directories to be searched as if
-I, but after any paths given with
options on the command line. The environment variable is used
regardless of which language is being preprocessed.
The remaining environment variables apply only when preprocessing the
particular language indicated. Each specifies a list of directories
to be searched as if specified with
-isystem, but after any
paths given with
-isystem options on the command line.
See also Search Path.
The value of
DEPENDENCIES_OUTPUT can be just a file name, in
which case the Make rules are written to that file, guessing the target
name from the source file name. Or the value can have the form
, in which case the rules are written to
file file using target as the target name.
In other words, this environment variable is equivalent to combining
with an optional
-MT switch too.
DEPENDENCIES_OUTPUT(see DEPENDENCIES_OUTPUT), except that system header files are not ignored, so it implies
-MM. See Invocation.