OSDN Git Service

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