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