]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/doc/cppenv.texi
Daily bump.
[thirdparty/gcc.git] / gcc / doc / cppenv.texi
CommitLineData
23a5b65a 1@c Copyright (C) 1999-2014 Free Software Foundation, Inc.
40adaa27
NB
2@c This is part of the CPP and GCC manuals.
3@c For copying conditions, see the file gcc.texi.
4
5@c ---------------------------------------------------------------------
6@c Environment variables affecting the preprocessor
7@c ---------------------------------------------------------------------
8
9@c If this file is included with the flag ``cppmanual'' set, it is
10@c formatted for inclusion in the CPP manual; otherwise the main GCC manual.
11
caba570b 12@vtable @env
40adaa27
NB
13@item CPATH
14@itemx C_INCLUDE_PATH
15@itemx CPLUS_INCLUDE_PATH
16@itemx OBJC_INCLUDE_PATH
17@c Commented out until ObjC++ is part of GCC:
18@c @itemx OBJCPLUS_INCLUDE_PATH
19Each variable's value is a list of directories separated by a special
20character, much like @env{PATH}, in which to look for header files.
21The special character, @code{PATH_SEPARATOR}, is target-dependent and
95fef11f 22determined at GCC build time. For Microsoft Windows-based targets it is a
40adaa27
NB
23semicolon, and for almost all other targets it is a colon.
24
25@env{CPATH} specifies a list of directories to be searched as if
26specified with @option{-I}, but after any paths given with @option{-I}
caba570b 27options on the command line. This environment variable is used
40adaa27
NB
28regardless of which language is being preprocessed.
29
30The remaining environment variables apply only when preprocessing the
31particular language indicated. Each specifies a list of directories
32to be searched as if specified with @option{-isystem}, but after any
33paths given with @option{-isystem} options on the command line.
34
caba570b
ZW
35In all these variables, an empty element instructs the compiler to
36search its current working directory. Empty elements can appear at the
37beginning or end of a path. For instance, if the value of
38@env{CPATH} is @code{:/special/include}, that has the same
39effect as @samp{@w{-I. -I/special/include}}.
40
41@c man end
40adaa27
NB
42@ifset cppmanual
43See also @ref{Search Path}.
44@end ifset
caba570b 45@c man begin ENVIRONMENT
40adaa27
NB
46
47@item DEPENDENCIES_OUTPUT
40adaa27
NB
48@cindex dependencies for make as output
49If this variable is set, its value specifies how to output
50dependencies for Make based on the non-system header files processed
51by the compiler. System header files are ignored in the dependency
52output.
53
54The value of @env{DEPENDENCIES_OUTPUT} can be just a file name, in
55which case the Make rules are written to that file, guessing the target
56name from the source file name. Or the value can have the form
57@samp{@var{file} @var{target}}, in which case the rules are written to
58file @var{file} using @var{target} as the target name.
59
60In other words, this environment variable is equivalent to combining
61the options @option{-MM} and @option{-MF}
62@ifset cppmanual
63(@pxref{Invocation}),
64@end ifset
65@ifclear cppmanual
66(@pxref{Preprocessor Options}),
67@end ifclear
68with an optional @option{-MT} switch too.
69
70@item SUNPRO_DEPENDENCIES
71@cindex dependencies for make as output
caba570b
ZW
72This variable is the same as @env{DEPENDENCIES_OUTPUT} (see above),
73except that system header files are not ignored, so it implies
182d89a3
NB
74@option{-M} rather than @option{-MM}. However, the dependence on the
75main input file is omitted.
40adaa27
NB
76@ifset cppmanual
77@xref{Invocation}.
78@end ifset
79@ifclear cppmanual
80@xref{Preprocessor Options}.
81@end ifclear
caba570b 82@end vtable