cpp: Environment Variables
1
1 13 Environment Variables
1 ************************
1
1 This section describes the environment variables that affect how CPP
1 operates. You can use them to specify directories or prefixes to use
1 when searching for include files, or to control dependency output.
1
1 Note that you can also specify places to search using options such as
11 '-I', and control dependency output with options like '-M' (⇒
Invocation). These take precedence over environment variables, which
1 in turn take precedence over the configuration of GCC.
1
1 'CPATH'
1 'C_INCLUDE_PATH'
1 'CPLUS_INCLUDE_PATH'
1 'OBJC_INCLUDE_PATH'
1 Each variable's value is a list of directories separated by a
1 special character, much like 'PATH', in which to look for header
1 files. The special character, 'PATH_SEPARATOR', is
1 target-dependent and determined at GCC build time. For Microsoft
1 Windows-based targets it is a semicolon, and for almost all other
1 targets it is a colon.
1
1 'CPATH' specifies a list of directories to be searched as if
1 specified with '-I', but after any paths given with '-I' options on
1 the command line. This environment variable is used regardless of
1 which language is being preprocessed.
1
1 The remaining environment variables apply only when preprocessing
1 the particular language indicated. Each specifies a list of
1 directories to be searched as if specified with '-isystem', but
1 after any paths given with '-isystem' options on the command line.
1
1 In all these variables, an empty element instructs the compiler to
1 search its current working directory. Empty elements can appear at
1 the beginning or end of a path. For instance, if the value of
1 'CPATH' is ':/special/include', that has the same effect as
1 '-I. -I/special/include'.
1
1 See also ⇒Search Path.
1
1 'DEPENDENCIES_OUTPUT'
1 If this variable is set, its value specifies how to output
1 dependencies for Make based on the non-system header files
1 processed by the compiler. System header files are ignored in the
1 dependency output.
1
1 The value of 'DEPENDENCIES_OUTPUT' can be just a file name, in
1 which case the Make rules are written to that file, guessing the
1 target name from the source file name. Or the value can have the
1 form 'FILE TARGET', in which case the rules are written to file
1 FILE using TARGET as the target name.
1
1 In other words, this environment variable is equivalent to
1 combining the options '-MM' and '-MF' (⇒Invocation), with an
1 optional '-MT' switch too.
1
1 'SUNPRO_DEPENDENCIES'
1 This variable is the same as 'DEPENDENCIES_OUTPUT' (see above),
1 except that system header files are not ignored, so it implies '-M'
1 rather than '-MM'. However, the dependence on the main input file
1 is omitted. ⇒Invocation.
1
1 'SOURCE_DATE_EPOCH'
1 If this variable is set, its value specifies a UNIX timestamp to be
1 used in replacement of the current date and time in the '__DATE__'
1 and '__TIME__' macros, so that the embedded timestamps become
1 reproducible.
1
1 The value of 'SOURCE_DATE_EPOCH' must be a UNIX timestamp, defined
1 as the number of seconds (excluding leap seconds) since 01 Jan 1970
1 00:00:00 represented in ASCII; identical to the output of ''date
1 +%s'' on GNU/Linux and other systems that support the '%s'
1 extension in the 'date' command.
1
1 The value should be a known timestamp such as the last modification
1 time of the source or package and it should be set by the build
1 process.
1