1@c Copyright (C) 1999-2020 Free Software Foundation, Inc. 2@c This is part of the CPP and GCC manuals. 3@c For copying conditions, see the file gcc.texi. 4 5@c --------------------------------------------------------------------- 6@c Environment variables affecting the preprocessor 7@c --------------------------------------------------------------------- 8 9@c If this file is included with the flag ``cppmanual'' set, it is 10@c formatted for inclusion in the CPP manual; otherwise the main GCC manual. 11 12@vtable @env 13@item CPATH 14@itemx C_INCLUDE_PATH 15@itemx CPLUS_INCLUDE_PATH 16@itemx OBJC_INCLUDE_PATH 17@c Commented out until ObjC++ is part of GCC: 18@c @itemx OBJCPLUS_INCLUDE_PATH 19Each variable's value is a list of directories separated by a special 20character, much like @env{PATH}, in which to look for header files. 21The special character, @code{PATH_SEPARATOR}, is target-dependent and 22determined at GCC build time. For Microsoft Windows-based targets it is a 23semicolon, and for almost all other targets it is a colon. 24 25@env{CPATH} specifies a list of directories to be searched as if 26specified with @option{-I}, but after any paths given with @option{-I} 27options on the command line. This environment variable is used 28regardless of which language is being preprocessed. 29 30The remaining environment variables apply only when preprocessing the 31particular language indicated. Each specifies a list of directories 32to be searched as if specified with @option{-isystem}, but after any 33paths given with @option{-isystem} options on the command line. 34 35In all these variables, an empty element instructs the compiler to 36search its current working directory. Empty elements can appear at the 37beginning or end of a path. For instance, if the value of 38@env{CPATH} is @code{:/special/include}, that has the same 39effect as @samp{@w{-I. -I/special/include}}. 40 41@c man end 42@ifset cppmanual 43See also @ref{Search Path}. 44@end ifset 45@c man begin ENVIRONMENT 46 47@item DEPENDENCIES_OUTPUT 48@cindex dependencies for make as output 49If this variable is set, its value specifies how to output 50dependencies for Make based on the non-system header files processed 51by the compiler. System header files are ignored in the dependency 52output. 53 54The value of @env{DEPENDENCIES_OUTPUT} can be just a file name, in 55which case the Make rules are written to that file, guessing the target 56name from the source file name. Or the value can have the form 57@samp{@var{file} @var{target}}, in which case the rules are written to 58file @var{file} using @var{target} as the target name. 59 60In other words, this environment variable is equivalent to combining 61the options @option{-MM} and @option{-MF} 62@ifset cppmanual 63(@pxref{Invocation}), 64@end ifset 65@ifclear cppmanual 66(@pxref{Preprocessor Options}), 67@end ifclear 68with an optional @option{-MT} switch too. 69 70@item SUNPRO_DEPENDENCIES 71@cindex dependencies for make as output 72This variable is the same as @env{DEPENDENCIES_OUTPUT} (see above), 73except that system header files are not ignored, so it implies 74@option{-M} rather than @option{-MM}. However, the dependence on the 75main input file is omitted. 76@ifset cppmanual 77@xref{Invocation}. 78@end ifset 79@ifclear cppmanual 80@xref{Preprocessor Options}. 81@end ifclear 82 83@item CPP_RESTRICTED 84@cindex only open regular files 85If this variable is defined, cpp will skip any include file which is not a 86regular file, and will continue searching for the requested name (this is 87always done if the found file is a directory). 88@ifset cppmanual 89@xref{Invocation}. 90@end ifset 91@ifclear cppmanual 92@xref{Preprocessor Options}. 93@end ifclear 94 95@item SOURCE_DATE_EPOCH 96If this variable is set, its value specifies a UNIX timestamp to be 97used in replacement of the current date and time in the @code{__DATE__} 98and @code{__TIME__} macros, so that the embedded timestamps become 99reproducible. 100 101The value of @env{SOURCE_DATE_EPOCH} must be a UNIX timestamp, 102defined as the number of seconds (excluding leap seconds) since 10301 Jan 1970 00:00:00 represented in ASCII; identical to the output of 104@samp{@command{date +%s}} on GNU/Linux and other systems that support the 105@code{%s} extension in the @code{date} command. 106 107The value should be a known timestamp such as the last modification 108time of the source or package and it should be set by the build 109process. 110 111@end vtable 112