cppenv.texi revision 256281
196263Sobrien@c Copyright (c) 1999, 2000, 2001, 2002, 2004 296263Sobrien@c Free Software Foundation, Inc. 396263Sobrien@c This is part of the CPP and GCC manuals. 496263Sobrien@c For copying conditions, see the file gcc.texi. 596263Sobrien 696263Sobrien@c --------------------------------------------------------------------- 796263Sobrien@c Environment variables affecting the preprocessor 896263Sobrien@c --------------------------------------------------------------------- 996263Sobrien 1096263Sobrien@c If this file is included with the flag ``cppmanual'' set, it is 1196263Sobrien@c formatted for inclusion in the CPP manual; otherwise the main GCC manual. 1296263Sobrien 1396263Sobrien@vtable @env 1496263Sobrien@item CPATH 1596263Sobrien@itemx C_INCLUDE_PATH 1696263Sobrien@itemx CPLUS_INCLUDE_PATH 1796263SobrienEach variable's value is a list of directories separated by a special 1896263Sobriencharacter, much like @env{PATH}, in which to look for header files. 1996263SobrienThe special character, @code{PATH_SEPARATOR}, is target-dependent and 2096263Sobriendetermined at GCC build time. For Microsoft Windows-based targets it is a 2196263Sobriensemicolon, and for almost all other targets it is a colon. 2296263Sobrien 2396263Sobrien@env{CPATH} specifies a list of directories to be searched as if 2496263Sobrienspecified with @option{-I}, but after any paths given with @option{-I} 2596263Sobrienoptions on the command line. This environment variable is used 2696263Sobrienregardless of which language is being preprocessed. 2796263Sobrien 2896263SobrienThe remaining environment variables apply only when preprocessing the 2996263Sobrienparticular language indicated. Each specifies a list of directories 3096263Sobriento be searched as if specified with @option{-isystem}, but after any 3196263Sobrienpaths given with @option{-isystem} options on the command line. 3296263Sobrien 3396263SobrienIn all these variables, an empty element instructs the compiler to 3496263Sobriensearch its current working directory. Empty elements can appear at the 3596263Sobrienbeginning or end of a path. For instance, if the value of 3696263Sobrien@env{CPATH} is @code{:/special/include}, that has the same 3796263Sobrieneffect as @samp{@w{-I. -I/special/include}}. 3896263Sobrien 3996263Sobrien@c man end 4096263Sobrien@ifset cppmanual 4196263SobrienSee also @ref{Search Path}. 4296263Sobrien@end ifset 43119256Skan@c man begin ENVIRONMENT 44119256Skan 45119256Skan@item DEPENDENCIES_OUTPUT 46119256Skan@cindex dependencies for make as output 47119256SkanIf this variable is set, its value specifies how to output 4896263Sobriendependencies for Make based on the non-system header files processed 4996263Sobrienby the compiler. System header files are ignored in the dependency 5096263Sobrienoutput. 5196263Sobrien 5296263SobrienThe value of @env{DEPENDENCIES_OUTPUT} can be just a file name, in 5396263Sobrienwhich case the Make rules are written to that file, guessing the target 5496263Sobrienname from the source file name. Or the value can have the form 5596263Sobrien@samp{@var{file} @var{target}}, in which case the rules are written to 5696263Sobrienfile @var{file} using @var{target} as the target name. 57117395Skan 58117395SkanIn other words, this environment variable is equivalent to combining 59117395Skanthe options @option{-MM} and @option{-MF} 60117395Skan@ifset cppmanual 6196263Sobrien(@pxref{Invocation}), 6296263Sobrien@end ifset 6396263Sobrien@ifclear cppmanual 64117395Skan(@pxref{Preprocessor Options}), 6596263Sobrien@end ifclear 6696263Sobrienwith an optional @option{-MT} switch too. 6796263Sobrien 6896263Sobrien@item SUNPRO_DEPENDENCIES 6996263Sobrien@cindex dependencies for make as output 7096263SobrienThis variable is the same as @env{DEPENDENCIES_OUTPUT} (see above), 7196263Sobrienexcept that system header files are not ignored, so it implies 7296263Sobrien@option{-M} rather than @option{-MM}. However, the dependence on the 7396263Sobrienmain input file is omitted. 7496263Sobrien@ifset cppmanual 7596263Sobrien@xref{Invocation}. 7696263Sobrien@end ifset 7796263Sobrien@ifclear cppmanual 7896263Sobrien@xref{Preprocessor Options}. 7996263Sobrien@end ifclear 8096263Sobrien@end vtable 8196263Sobrien