Make:SpecialBuiltInTargetNames
lastmod 2018-08-17created 2018-06-182 edits
In Make, Special Built-in Target Names are names that have special meanings when they appear as targets.
List of Special Built-in Target Names
-
.PHONY - The prerequisites of the special target
.PHONYare considered to be phony targets. When it is time to consider such a target, make will run its commands unconditionally, regardless of whether a file with that name exists or what its last-modification time is.
-
.SUFFIXES - The prerequisites of the special target
.SUFFIXESare the list of suffixes to be used in checking for suffix rules. (See sectionOld-Fashioned Suffix Rules1).
-
.DEFAULT - The commands specified for
.DEFAULTare used for any target for which no rules are found (either explicit rules or implicit rules). (See sectionDefining Last-Resort Default Rules2). If.DEFAULTcommands are specified, every file mentioned as a prerequisite, but not as a target in a rule, will have these commands executed on its behalf. (See sectionImplicit Rule Search Algorithm3).
-
.PRECIOUS - The targets which
.PRECIOUSdepends on are given the following special treatment: if make is killed or interrupted during the execution of their commands, the target is not deleted. (See sectionInterrupting or Killing make4). Also, if the target is an intermediate file, it will not be deleted after it is no longer needed, as is normally done. (See sectionChains of Implicit Rules5). You can also list the target pattern of an implicit rule (such as '%.o') as a prerequisite of the special target.PRECIOUSto preserve intermediate files created by rules whose target patterns match that file's name.
-
.INTERMEDIATE - The targets which
.INTERMEDIATEdepends on are treated as intermediate files. (See sectionChains of Implicit Rules6)..INTERMEDIATEwith no prerequisites marks all targets mentioned in the makefile as intermediate files.
-
.SECONDARY - The targets which
.SECONDARYdepends on are treated as intermediate files, except that they are never automatically deleted. (See sectionChains of Implicit Rules7)..SECONDARYwith no prerequisites marks all targets mentioned in the makefile as secondary.
-
.IGNORE - If you specify prerequisites for
.IGNORE, make will ignore errors in the execution of the commands run for those particular files. The commands for.IGNOREare not meaningful. If mentioned as a target with no prerequisites,.IGNOREsays to ignore errors in the execution of commands for all files. This usage of.IGNOREis supported only for historical compatibility. Since it affects every command in the makefile, it is not very useful; we recommend you use the more selective ways to ignore errors in specific commands. (See sectionErrors in Commands8).
-
.SILENT - If you specify prerequisites for
.SILENT, make will not display the commands used to remake those particular files before executing them. The commands for.SILENTare not meaningful. If mentioned as a target with no prerequisites,.SILENTsays not to display any commands before executing them. This usage of.SILENTis supported only for historical compatibility. We recommend you use the more selective ways to silence specific commands. (See sectionCommand Echoing9). If you want to silence all commands for a particular run of make, use the-sor--silentoption (See sectionSummary of Options10).
-
.EXPORT_ALL_VARIABLES - Simply by being mentioned as a target, this tells make to export all variables to child processes by default. (See section
Communicating Variables to a Sub-make11).
See also
References
-
See
viper.pe.kr/make-ko/make-ko_10.html#SEC102in Viper.pe.kr-make-ko.7z ↩ -
See
viper.pe.kr/make-ko/make-ko_10.html#SEC101in Viper.pe.kr-make-ko.7z ↩ -
See
viper.pe.kr/make-ko/make-ko_10.html#SEC103in Viper.pe.kr-make-ko.7z ↩ -
See
viper.pe.kr/make-ko/make-ko_5.html#SEC48in Viper.pe.kr-make-ko.7z ↩ -
See
viper.pe.kr/make-ko/make-ko_10.html#SEC93in Viper.pe.kr-make-ko.7z ↩ -
See
viper.pe.kr/make-ko/make-ko_10.html#SEC93in Viper.pe.kr-make-ko.7z ↩ -
See
viper.pe.kr/make-ko/make-ko_10.html#SEC93in Viper.pe.kr-make-ko.7z ↩ -
See
viper.pe.kr/make-ko/make-ko_5.html#SEC47in Viper.pe.kr-make-ko.7z ↩ -
See
viper.pe.kr/make-ko/make-ko_5.html#SEC44in Viper.pe.kr-make-ko.7z ↩ -
See
viper.pe.kr/make-ko/make-ko_9.html#SEC88in Viper.pe.kr-make-ko.7z ↩ -
See
viper.pe.kr/make-ko/make-ko_5.html#SEC51in Viper.pe.kr-make-ko.7z ↩