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