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