1CPP(1) GNU CPP(1)
2
3
4
6 cpp - The C Preprocessor
7
9 cpp [-Dmacro[=defn]...] [-Umacro]
10 [-Idir...] [-iquotedir...]
11 [-M|-MM] [-MG] [-MF filename]
12 [-MP] [-MQ target...]
13 [-MT target...]
14 infile [[-o] outfile]
15
16 Only the most useful options are given above; see below for a more
17 complete list of preprocessor-specific options. In addition, cpp
18 accepts most gcc driver options, which are not listed here. Refer to
19 the GCC documentation for details.
20
22 The C preprocessor, often known as cpp, is a macro processor that is
23 used automatically by the C compiler to transform your program before
24 compilation. It is called a macro processor because it allows you to
25 define macros, which are brief abbreviations for longer constructs.
26
27 The C preprocessor is intended to be used only with C, C++, and
28 Objective-C source code. In the past, it has been abused as a general
29 text processor. It will choke on input which does not obey C's lexical
30 rules. For example, apostrophes will be interpreted as the beginning
31 of character constants, and cause errors. Also, you cannot rely on it
32 preserving characteristics of the input which are not significant to
33 C-family languages. If a Makefile is preprocessed, all the hard tabs
34 will be removed, and the Makefile will not work.
35
36 Having said that, you can often get away with using cpp on things which
37 are not C. Other Algol-ish programming languages are often safe (Ada,
38 etc.) So is assembly, with caution. -traditional-cpp mode preserves
39 more white space, and is otherwise more permissive. Many of the
40 problems can be avoided by writing C or C++ style comments instead of
41 native language comments, and keeping macros simple.
42
43 Wherever possible, you should use a preprocessor geared to the language
44 you are writing in. Modern versions of the GNU assembler have macro
45 facilities. Most high level programming languages have their own
46 conditional compilation and inclusion mechanism. If all else fails,
47 try a true general text processor, such as GNU M4.
48
49 C preprocessors vary in some details. This manual discusses the GNU C
50 preprocessor, which provides a small superset of the features of ISO
51 Standard C. In its default mode, the GNU C preprocessor does not do a
52 few things required by the standard. These are features which are
53 rarely, if ever, used, and may cause surprising changes to the meaning
54 of a program which does not expect them. To get strict ISO Standard C,
55 you should use the -std=c90, -std=c99, -std=c11 or -std=c17 options,
56 depending on which version of the standard you want. To get all the
57 mandatory diagnostics, you must also use -pedantic.
58
59 This manual describes the behavior of the ISO preprocessor. To
60 minimize gratuitous differences, where the ISO preprocessor's behavior
61 does not conflict with traditional semantics, the traditional
62 preprocessor should behave the same way. The various differences that
63 do exist are detailed in the section Traditional Mode.
64
65 For clarity, unless noted otherwise, references to CPP in this manual
66 refer to GNU CPP.
67
69 The cpp command expects two file names as arguments, infile and
70 outfile. The preprocessor reads infile together with any other files
71 it specifies with #include. All the output generated by the combined
72 input files is written in outfile.
73
74 Either infile or outfile may be -, which as infile means to read from
75 standard input and as outfile means to write to standard output. If
76 either file is omitted, it means the same as if - had been specified
77 for that file. You can also use the -o outfile option to specify the
78 output file.
79
80 Unless otherwise noted, or the option ends in =, all options which take
81 an argument may have that argument appear either immediately after the
82 option, or with a space between option and argument: -Ifoo and -I foo
83 have the same effect.
84
85 Many options have multi-letter names; therefore multiple single-letter
86 options may not be grouped: -dM is very different from -d -M.
87
88 -D name
89 Predefine name as a macro, with definition 1.
90
91 -D name=definition
92 The contents of definition are tokenized and processed as if they
93 appeared during translation phase three in a #define directive. In
94 particular, the definition is truncated by embedded newline
95 characters.
96
97 If you are invoking the preprocessor from a shell or shell-like
98 program you may need to use the shell's quoting syntax to protect
99 characters such as spaces that have a meaning in the shell syntax.
100
101 If you wish to define a function-like macro on the command line,
102 write its argument list with surrounding parentheses before the
103 equals sign (if any). Parentheses are meaningful to most shells,
104 so you should quote the option. With sh and csh,
105 -D'name(args...)=definition' works.
106
107 -D and -U options are processed in the order they are given on the
108 command line. All -imacros file and -include file options are
109 processed after all -D and -U options.
110
111 -U name
112 Cancel any previous definition of name, either built in or provided
113 with a -D option.
114
115 -include file
116 Process file as if "#include "file"" appeared as the first line of
117 the primary source file. However, the first directory searched for
118 file is the preprocessor's working directory instead of the
119 directory containing the main source file. If not found there, it
120 is searched for in the remainder of the "#include "..."" search
121 chain as normal.
122
123 If multiple -include options are given, the files are included in
124 the order they appear on the command line.
125
126 -imacros file
127 Exactly like -include, except that any output produced by scanning
128 file is thrown away. Macros it defines remain defined. This
129 allows you to acquire all the macros from a header without also
130 processing its declarations.
131
132 All files specified by -imacros are processed before all files
133 specified by -include.
134
135 -undef
136 Do not predefine any system-specific or GCC-specific macros. The
137 standard predefined macros remain defined.
138
139 -pthread
140 Define additional macros required for using the POSIX threads
141 library. You should use this option consistently for both
142 compilation and linking. This option is supported on GNU/Linux
143 targets, most other Unix derivatives, and also on x86 Cygwin and
144 MinGW targets.
145
146 -M Instead of outputting the result of preprocessing, output a rule
147 suitable for make describing the dependencies of the main source
148 file. The preprocessor outputs one make rule containing the object
149 file name for that source file, a colon, and the names of all the
150 included files, including those coming from -include or -imacros
151 command-line options.
152
153 Unless specified explicitly (with -MT or -MQ), the object file name
154 consists of the name of the source file with any suffix replaced
155 with object file suffix and with any leading directory parts
156 removed. If there are many included files then the rule is split
157 into several lines using \-newline. The rule has no commands.
158
159 This option does not suppress the preprocessor's debug output, such
160 as -dM. To avoid mixing such debug output with the dependency
161 rules you should explicitly specify the dependency output file with
162 -MF, or use an environment variable like DEPENDENCIES_OUTPUT.
163 Debug output is still sent to the regular output stream as normal.
164
165 Passing -M to the driver implies -E, and suppresses warnings with
166 an implicit -w.
167
168 -MM Like -M but do not mention header files that are found in system
169 header directories, nor header files that are included, directly or
170 indirectly, from such a header.
171
172 This implies that the choice of angle brackets or double quotes in
173 an #include directive does not in itself determine whether that
174 header appears in -MM dependency output.
175
176 -MF file
177 When used with -M or -MM, specifies a file to write the
178 dependencies to. If no -MF switch is given the preprocessor sends
179 the rules to the same place it would send preprocessed output.
180
181 When used with the driver options -MD or -MMD, -MF overrides the
182 default dependency output file.
183
184 If file is -, then the dependencies are written to stdout.
185
186 -MG In conjunction with an option such as -M requesting dependency
187 generation, -MG assumes missing header files are generated files
188 and adds them to the dependency list without raising an error. The
189 dependency filename is taken directly from the "#include" directive
190 without prepending any path. -MG also suppresses preprocessed
191 output, as a missing header file renders this useless.
192
193 This feature is used in automatic updating of makefiles.
194
195 -Mno-modules
196 Disable dependency generation for compiled module interfaces.
197
198 -MP This option instructs CPP to add a phony target for each dependency
199 other than the main file, causing each to depend on nothing. These
200 dummy rules work around errors make gives if you remove header
201 files without updating the Makefile to match.
202
203 This is typical output:
204
205 test.o: test.c test.h
206
207 test.h:
208
209 -MT target
210 Change the target of the rule emitted by dependency generation. By
211 default CPP takes the name of the main input file, deletes any
212 directory components and any file suffix such as .c, and appends
213 the platform's usual object suffix. The result is the target.
214
215 An -MT option sets the target to be exactly the string you specify.
216 If you want multiple targets, you can specify them as a single
217 argument to -MT, or use multiple -MT options.
218
219 For example, -MT '$(objpfx)foo.o' might give
220
221 $(objpfx)foo.o: foo.c
222
223 -MQ target
224 Same as -MT, but it quotes any characters which are special to
225 Make. -MQ '$(objpfx)foo.o' gives
226
227 $$(objpfx)foo.o: foo.c
228
229 The default target is automatically quoted, as if it were given
230 with -MQ.
231
232 -MD -MD is equivalent to -M -MF file, except that -E is not implied.
233 The driver determines file based on whether an -o option is given.
234 If it is, the driver uses its argument but with a suffix of .d,
235 otherwise it takes the name of the input file, removes any
236 directory components and suffix, and applies a .d suffix.
237
238 If -MD is used in conjunction with -E, any -o switch is understood
239 to specify the dependency output file, but if used without -E, each
240 -o is understood to specify a target object file.
241
242 Since -E is not implied, -MD can be used to generate a dependency
243 output file as a side effect of the compilation process.
244
245 -MMD
246 Like -MD except mention only user header files, not system header
247 files.
248
249 -fpreprocessed
250 Indicate to the preprocessor that the input file has already been
251 preprocessed. This suppresses things like macro expansion,
252 trigraph conversion, escaped newline splicing, and processing of
253 most directives. The preprocessor still recognizes and removes
254 comments, so that you can pass a file preprocessed with -C to the
255 compiler without problems. In this mode the integrated
256 preprocessor is little more than a tokenizer for the front ends.
257
258 -fpreprocessed is implicit if the input file has one of the
259 extensions .i, .ii or .mi. These are the extensions that GCC uses
260 for preprocessed files created by -save-temps.
261
262 -fdirectives-only
263 When preprocessing, handle directives, but do not expand macros.
264
265 The option's behavior depends on the -E and -fpreprocessed options.
266
267 With -E, preprocessing is limited to the handling of directives
268 such as "#define", "#ifdef", and "#error". Other preprocessor
269 operations, such as macro expansion and trigraph conversion are not
270 performed. In addition, the -dD option is implicitly enabled.
271
272 With -fpreprocessed, predefinition of command line and most builtin
273 macros is disabled. Macros such as "__LINE__", which are
274 contextually dependent, are handled normally. This enables
275 compilation of files previously preprocessed with "-E
276 -fdirectives-only".
277
278 With both -E and -fpreprocessed, the rules for -fpreprocessed take
279 precedence. This enables full preprocessing of files previously
280 preprocessed with "-E -fdirectives-only".
281
282 -fdollars-in-identifiers
283 Accept $ in identifiers.
284
285 -fextended-identifiers
286 Accept universal character names and extended characters in
287 identifiers. This option is enabled by default for C99 (and later
288 C standard versions) and C++.
289
290 -fno-canonical-system-headers
291 When preprocessing, do not shorten system header paths with
292 canonicalization.
293
294 -fmax-include-depth=depth
295 Set the maximum depth of the nested #include. The default is 200.
296
297 -ftabstop=width
298 Set the distance between tab stops. This helps the preprocessor
299 report correct column numbers in warnings or errors, even if tabs
300 appear on the line. If the value is less than 1 or greater than
301 100, the option is ignored. The default is 8.
302
303 -ftrack-macro-expansion[=level]
304 Track locations of tokens across macro expansions. This allows the
305 compiler to emit diagnostic about the current macro expansion stack
306 when a compilation error occurs in a macro expansion. Using this
307 option makes the preprocessor and the compiler consume more memory.
308 The level parameter can be used to choose the level of precision of
309 token location tracking thus decreasing the memory consumption if
310 necessary. Value 0 of level de-activates this option. Value 1
311 tracks tokens locations in a degraded mode for the sake of minimal
312 memory overhead. In this mode all tokens resulting from the
313 expansion of an argument of a function-like macro have the same
314 location. Value 2 tracks tokens locations completely. This value is
315 the most memory hungry. When this option is given no argument, the
316 default parameter value is 2.
317
318 Note that "-ftrack-macro-expansion=2" is activated by default.
319
320 -fmacro-prefix-map=old=new
321 When preprocessing files residing in directory old, expand the
322 "__FILE__" and "__BASE_FILE__" macros as if the files resided in
323 directory new instead. This can be used to change an absolute path
324 to a relative path by using . for new which can result in more
325 reproducible builds that are location independent. This option
326 also affects "__builtin_FILE()" during compilation. See also
327 -ffile-prefix-map.
328
329 -fexec-charset=charset
330 Set the execution character set, used for string and character
331 constants. The default is UTF-8. charset can be any encoding
332 supported by the system's "iconv" library routine.
333
334 -fwide-exec-charset=charset
335 Set the wide execution character set, used for wide string and
336 character constants. The default is UTF-32 or UTF-16, whichever
337 corresponds to the width of "wchar_t". As with -fexec-charset,
338 charset can be any encoding supported by the system's "iconv"
339 library routine; however, you will have problems with encodings
340 that do not fit exactly in "wchar_t".
341
342 -finput-charset=charset
343 Set the input character set, used for translation from the
344 character set of the input file to the source character set used by
345 GCC. If the locale does not specify, or GCC cannot get this
346 information from the locale, the default is UTF-8. This can be
347 overridden by either the locale or this command-line option.
348 Currently the command-line option takes precedence if there's a
349 conflict. charset can be any encoding supported by the system's
350 "iconv" library routine.
351
352 -fworking-directory
353 Enable generation of linemarkers in the preprocessor output that
354 let the compiler know the current working directory at the time of
355 preprocessing. When this option is enabled, the preprocessor
356 emits, after the initial linemarker, a second linemarker with the
357 current working directory followed by two slashes. GCC uses this
358 directory, when it's present in the preprocessed input, as the
359 directory emitted as the current working directory in some
360 debugging information formats. This option is implicitly enabled
361 if debugging information is enabled, but this can be inhibited with
362 the negated form -fno-working-directory. If the -P flag is present
363 in the command line, this option has no effect, since no "#line"
364 directives are emitted whatsoever.
365
366 -A predicate=answer
367 Make an assertion with the predicate predicate and answer answer.
368 This form is preferred to the older form -A predicate(answer),
369 which is still supported, because it does not use shell special
370 characters.
371
372 -A -predicate=answer
373 Cancel an assertion with the predicate predicate and answer answer.
374
375 -C Do not discard comments. All comments are passed through to the
376 output file, except for comments in processed directives, which are
377 deleted along with the directive.
378
379 You should be prepared for side effects when using -C; it causes
380 the preprocessor to treat comments as tokens in their own right.
381 For example, comments appearing at the start of what would be a
382 directive line have the effect of turning that line into an
383 ordinary source line, since the first token on the line is no
384 longer a #.
385
386 -CC Do not discard comments, including during macro expansion. This is
387 like -C, except that comments contained within macros are also
388 passed through to the output file where the macro is expanded.
389
390 In addition to the side effects of the -C option, the -CC option
391 causes all C++-style comments inside a macro to be converted to
392 C-style comments. This is to prevent later use of that macro from
393 inadvertently commenting out the remainder of the source line.
394
395 The -CC option is generally used to support lint comments.
396
397 -P Inhibit generation of linemarkers in the output from the
398 preprocessor. This might be useful when running the preprocessor
399 on something that is not C code, and will be sent to a program
400 which might be confused by the linemarkers.
401
402 -traditional
403 -traditional-cpp
404 Try to imitate the behavior of pre-standard C preprocessors, as
405 opposed to ISO C preprocessors.
406
407 Note that GCC does not otherwise attempt to emulate a pre-standard
408 C compiler, and these options are only supported with the -E
409 switch, or when invoking CPP explicitly.
410
411 -trigraphs
412 Support ISO C trigraphs. These are three-character sequences, all
413 starting with ??, that are defined by ISO C to stand for single
414 characters. For example, ??/ stands for \, so '??/n' is a
415 character constant for a newline.
416
417 By default, GCC ignores trigraphs, but in standard-conforming modes
418 it converts them. See the -std and -ansi options.
419
420 -remap
421 Enable special code to work around file systems which only permit
422 very short file names, such as MS-DOS.
423
424 -H Print the name of each header file used, in addition to other
425 normal activities. Each name is indented to show how deep in the
426 #include stack it is. Precompiled header files are also printed,
427 even if they are found to be invalid; an invalid precompiled header
428 file is printed with ...x and a valid one with ...! .
429
430 -dletters
431 Says to make debugging dumps during compilation as specified by
432 letters. The flags documented here are those relevant to the
433 preprocessor. Other letters are interpreted by the compiler
434 proper, or reserved for future versions of GCC, and so are silently
435 ignored. If you specify letters whose behavior conflicts, the
436 result is undefined.
437
438 -dM Instead of the normal output, generate a list of #define
439 directives for all the macros defined during the execution of
440 the preprocessor, including predefined macros. This gives you
441 a way of finding out what is predefined in your version of the
442 preprocessor. Assuming you have no file foo.h, the command
443
444 touch foo.h; cpp -dM foo.h
445
446 shows all the predefined macros.
447
448 -dD Like -dM except in two respects: it does not include the
449 predefined macros, and it outputs both the #define directives
450 and the result of preprocessing. Both kinds of output go to
451 the standard output file.
452
453 -dN Like -dD, but emit only the macro names, not their expansions.
454
455 -dI Output #include directives in addition to the result of
456 preprocessing.
457
458 -dU Like -dD except that only macros that are expanded, or whose
459 definedness is tested in preprocessor directives, are output;
460 the output is delayed until the use or test of the macro; and
461 #undef directives are also output for macros tested but
462 undefined at the time.
463
464 -fdebug-cpp
465 This option is only useful for debugging GCC. When used from CPP
466 or with -E, it dumps debugging information about location maps.
467 Every token in the output is preceded by the dump of the map its
468 location belongs to.
469
470 When used from GCC without -E, this option has no effect.
471
472 -I dir
473 -iquote dir
474 -isystem dir
475 -idirafter dir
476 Add the directory dir to the list of directories to be searched for
477 header files during preprocessing.
478
479 If dir begins with = or $SYSROOT, then the = or $SYSROOT is
480 replaced by the sysroot prefix; see --sysroot and -isysroot.
481
482 Directories specified with -iquote apply only to the quote form of
483 the directive, "#include "file"". Directories specified with -I,
484 -isystem, or -idirafter apply to lookup for both the
485 "#include "file"" and "#include <file>" directives.
486
487 You can specify any number or combination of these options on the
488 command line to search for header files in several directories.
489 The lookup order is as follows:
490
491 1. For the quote form of the include directive, the directory of
492 the current file is searched first.
493
494 2. For the quote form of the include directive, the directories
495 specified by -iquote options are searched in left-to-right
496 order, as they appear on the command line.
497
498 3. Directories specified with -I options are scanned in left-to-
499 right order.
500
501 4. Directories specified with -isystem options are scanned in
502 left-to-right order.
503
504 5. Standard system directories are scanned.
505
506 6. Directories specified with -idirafter options are scanned in
507 left-to-right order.
508
509 You can use -I to override a system header file, substituting your
510 own version, since these directories are searched before the
511 standard system header file directories. However, you should not
512 use this option to add directories that contain vendor-supplied
513 system header files; use -isystem for that.
514
515 The -isystem and -idirafter options also mark the directory as a
516 system directory, so that it gets the same special treatment that
517 is applied to the standard system directories.
518
519 If a standard system include directory, or a directory specified
520 with -isystem, is also specified with -I, the -I option is ignored.
521 The directory is still searched but as a system directory at its
522 normal position in the system include chain. This is to ensure
523 that GCC's procedure to fix buggy system headers and the ordering
524 for the "#include_next" directive are not inadvertently changed.
525 If you really need to change the search order for system
526 directories, use the -nostdinc and/or -isystem options.
527
528 -I- Split the include path. This option has been deprecated. Please
529 use -iquote instead for -I directories before the -I- and remove
530 the -I- option.
531
532 Any directories specified with -I options before -I- are searched
533 only for headers requested with "#include "file""; they are not
534 searched for "#include <file>". If additional directories are
535 specified with -I options after the -I-, those directories are
536 searched for all #include directives.
537
538 In addition, -I- inhibits the use of the directory of the current
539 file directory as the first search directory for "#include "file"".
540 There is no way to override this effect of -I-.
541
542 -iprefix prefix
543 Specify prefix as the prefix for subsequent -iwithprefix options.
544 If the prefix represents a directory, you should include the final
545 /.
546
547 -iwithprefix dir
548 -iwithprefixbefore dir
549 Append dir to the prefix specified previously with -iprefix, and
550 add the resulting directory to the include search path.
551 -iwithprefixbefore puts it in the same place -I would; -iwithprefix
552 puts it where -idirafter would.
553
554 -isysroot dir
555 This option is like the --sysroot option, but applies only to
556 header files (except for Darwin targets, where it applies to both
557 header files and libraries). See the --sysroot option for more
558 information.
559
560 -imultilib dir
561 Use dir as a subdirectory of the directory containing target-
562 specific C++ headers.
563
564 -nostdinc
565 Do not search the standard system directories for header files.
566 Only the directories explicitly specified with -I, -iquote,
567 -isystem, and/or -idirafter options (and the directory of the
568 current file, if appropriate) are searched.
569
570 -nostdinc++
571 Do not search for header files in the C++-specific standard
572 directories, but do still search the other standard directories.
573 (This option is used when building the C++ library.)
574
575 -Wcomment
576 -Wcomments
577 Warn whenever a comment-start sequence /* appears in a /* comment,
578 or whenever a backslash-newline appears in a // comment. This
579 warning is enabled by -Wall.
580
581 -Wtrigraphs
582 Warn if any trigraphs are encountered that might change the meaning
583 of the program. Trigraphs within comments are not warned about,
584 except those that would form escaped newlines.
585
586 This option is implied by -Wall. If -Wall is not given, this
587 option is still enabled unless trigraphs are enabled. To get
588 trigraph conversion without warnings, but get the other -Wall
589 warnings, use -trigraphs -Wall -Wno-trigraphs.
590
591 -Wundef
592 Warn if an undefined identifier is evaluated in an "#if" directive.
593 Such identifiers are replaced with zero.
594
595 -Wexpansion-to-defined
596 Warn whenever defined is encountered in the expansion of a macro
597 (including the case where the macro is expanded by an #if
598 directive). Such usage is not portable. This warning is also
599 enabled by -Wpedantic and -Wextra.
600
601 -Wunused-macros
602 Warn about macros defined in the main file that are unused. A
603 macro is used if it is expanded or tested for existence at least
604 once. The preprocessor also warns if the macro has not been used
605 at the time it is redefined or undefined.
606
607 Built-in macros, macros defined on the command line, and macros
608 defined in include files are not warned about.
609
610 Note: If a macro is actually used, but only used in skipped
611 conditional blocks, then the preprocessor reports it as unused. To
612 avoid the warning in such a case, you might improve the scope of
613 the macro's definition by, for example, moving it into the first
614 skipped block. Alternatively, you could provide a dummy use with
615 something like:
616
617 #if defined the_macro_causing_the_warning
618 #endif
619
620 -Wno-endif-labels
621 Do not warn whenever an "#else" or an "#endif" are followed by
622 text. This sometimes happens in older programs with code of the
623 form
624
625 #if FOO
626 ...
627 #else FOO
628 ...
629 #endif FOO
630
631 The second and third "FOO" should be in comments. This warning is
632 on by default.
633
635 This section describes the environment variables that affect how CPP
636 operates. You can use them to specify directories or prefixes to use
637 when searching for include files, or to control dependency output.
638
639 Note that you can also specify places to search using options such as
640 -I, and control dependency output with options like -M. These take
641 precedence over environment variables, which in turn take precedence
642 over the configuration of GCC.
643
644 CPATH
645 C_INCLUDE_PATH
646 CPLUS_INCLUDE_PATH
647 OBJC_INCLUDE_PATH
648 Each variable's value is a list of directories separated by a
649 special character, much like PATH, in which to look for header
650 files. The special character, "PATH_SEPARATOR", is target-
651 dependent and determined at GCC build time. For Microsoft Windows-
652 based targets it is a semicolon, and for almost all other targets
653 it is a colon.
654
655 CPATH specifies a list of directories to be searched as if
656 specified with -I, but after any paths given with -I options on the
657 command line. This environment variable is used regardless of
658 which language is being preprocessed.
659
660 The remaining environment variables apply only when preprocessing
661 the particular language indicated. Each specifies a list of
662 directories to be searched as if specified with -isystem, but after
663 any paths given with -isystem options on the command line.
664
665 In all these variables, an empty element instructs the compiler to
666 search its current working directory. Empty elements can appear at
667 the beginning or end of a path. For instance, if the value of
668 CPATH is ":/special/include", that has the same effect as
669 -I. -I/special/include.
670
671 DEPENDENCIES_OUTPUT
672 If this variable is set, its value specifies how to output
673 dependencies for Make based on the non-system header files
674 processed by the compiler. System header files are ignored in the
675 dependency output.
676
677 The value of DEPENDENCIES_OUTPUT can be just a file name, in which
678 case the Make rules are written to that file, guessing the target
679 name from the source file name. Or the value can have the form
680 file target, in which case the rules are written to file file using
681 target as the target name.
682
683 In other words, this environment variable is equivalent to
684 combining the options -MM and -MF, with an optional -MT switch too.
685
686 SUNPRO_DEPENDENCIES
687 This variable is the same as DEPENDENCIES_OUTPUT (see above),
688 except that system header files are not ignored, so it implies -M
689 rather than -MM. However, the dependence on the main input file is
690 omitted.
691
692 SOURCE_DATE_EPOCH
693 If this variable is set, its value specifies a UNIX timestamp to be
694 used in replacement of the current date and time in the "__DATE__"
695 and "__TIME__" macros, so that the embedded timestamps become
696 reproducible.
697
698 The value of SOURCE_DATE_EPOCH must be a UNIX timestamp, defined as
699 the number of seconds (excluding leap seconds) since 01 Jan 1970
700 00:00:00 represented in ASCII; identical to the output of "date
701 +%s" on GNU/Linux and other systems that support the %s extension
702 in the "date" command.
703
704 The value should be a known timestamp such as the last modification
705 time of the source or package and it should be set by the build
706 process.
707
709 gpl(7), gfdl(7), fsf-funding(7), gcc(1), and the Info entries for cpp
710 and gcc.
711
713 Copyright (c) 1987-2022 Free Software Foundation, Inc.
714
715 Permission is granted to copy, distribute and/or modify this document
716 under the terms of the GNU Free Documentation License, Version 1.3 or
717 any later version published by the Free Software Foundation. A copy of
718 the license is included in the man page gfdl(7). This manual contains
719 no Invariant Sections. The Front-Cover Texts are (a) (see below), and
720 the Back-Cover Texts are (b) (see below).
721
722 (a) The FSF's Front-Cover Text is:
723
724 A GNU Manual
725
726 (b) The FSF's Back-Cover Text is:
727
728 You have freedom to copy and modify this GNU Manual, like GNU
729 software. Copies published by the Free Software Foundation raise
730 funds for GNU development.
731
732
733
734gcc-12.1.0 2022-05-06 CPP(1)