]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/gcc/doc/cppenv.texi
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / gcc / doc / cppenv.texi
1 @c Copyright (c) 1999, 2000, 2001, 2002, 2004
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 @vtable @env
14 @item CPATH
15 @itemx C_INCLUDE_PATH
16 @itemx CPLUS_INCLUDE_PATH
17 Each variable's value is a list of directories separated by a special
18 character, much like @env{PATH}, in which to look for header files.
19 The special character, @code{PATH_SEPARATOR}, is target-dependent and
20 determined at GCC build time.  For Microsoft Windows-based targets it is a
21 semicolon, and for almost all other targets it is a colon.
22
23 @env{CPATH} specifies a list of directories to be searched as if
24 specified with @option{-I}, but after any paths given with @option{-I}
25 options on the command line.  This environment variable is used
26 regardless of which language is being preprocessed.
27
28 The remaining environment variables apply only when preprocessing the
29 particular language indicated.  Each specifies a list of directories
30 to be searched as if specified with @option{-isystem}, but after any
31 paths given with @option{-isystem} options on the command line.
32
33 In all these variables, an empty element instructs the compiler to
34 search its current working directory.  Empty elements can appear at the
35 beginning or end of a path.  For instance, if the value of
36 @env{CPATH} is @code{:/special/include}, that has the same
37 effect as @samp{@w{-I. -I/special/include}}.
38
39 @c man end
40 @ifset cppmanual
41 See also @ref{Search Path}.
42 @end ifset
43 @c man begin ENVIRONMENT
44
45 @item DEPENDENCIES_OUTPUT
46 @cindex dependencies for make as output
47 If this variable is set, its value specifies how to output
48 dependencies for Make based on the non-system header files processed
49 by the compiler.  System header files are ignored in the dependency
50 output.
51
52 The value of @env{DEPENDENCIES_OUTPUT} can be just a file name, in
53 which case the Make rules are written to that file, guessing the target
54 name from the source file name.  Or the value can have the form
55 @samp{@var{file} @var{target}}, in which case the rules are written to
56 file @var{file} using @var{target} as the target name.
57
58 In other words, this environment variable is equivalent to combining
59 the options @option{-MM} and @option{-MF}
60 @ifset cppmanual
61 (@pxref{Invocation}),
62 @end ifset
63 @ifclear cppmanual
64 (@pxref{Preprocessor Options}),
65 @end ifclear
66 with an optional @option{-MT} switch too.
67
68 @item SUNPRO_DEPENDENCIES
69 @cindex dependencies for make as output
70 This variable is the same as @env{DEPENDENCIES_OUTPUT} (see above),
71 except that system header files are not ignored, so it implies
72 @option{-M} rather than @option{-MM}.  However, the dependence on the
73 main input file is omitted.
74 @ifset cppmanual
75 @xref{Invocation}.
76 @end ifset
77 @ifclear cppmanual
78 @xref{Preprocessor Options}.
79 @end ifclear
80 @end vtable