Skip to content
Search

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 .PHONY are 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 .SUFFIXES are the list of suffixes to be used in checking for suffix rules. (See section Old-Fashioned Suffix Rules1).
.DEFAULT
The commands specified for .DEFAULT are used for any target for which no rules are found (either explicit rules or implicit rules). (See section Defining Last-Resort Default Rules2). If .DEFAULT commands 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 section Implicit Rule Search Algorithm3).
.PRECIOUS
The targets which .PRECIOUS depends 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 section Interrupting 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 section Chains of Implicit Rules5). You can also list the target pattern of an implicit rule (such as '%.o') as a prerequisite of the special target .PRECIOUS to preserve intermediate files created by rules whose target patterns match that file's name.
.INTERMEDIATE
The targets which .INTERMEDIATE depends on are treated as intermediate files. (See section Chains of Implicit Rules6). .INTERMEDIATE with no prerequisites marks all targets mentioned in the makefile as intermediate files.
.SECONDARY
The targets which .SECONDARY depends on are treated as intermediate files, except that they are never automatically deleted. (See section Chains of Implicit Rules7). .SECONDARY with 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 .IGNORE are not meaningful. If mentioned as a target with no prerequisites, .IGNORE says to ignore errors in the execution of commands for all files. This usage of .IGNORE is 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 section Errors 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 .SILENT are not meaningful. If mentioned as a target with no prerequisites, .SILENT says not to display any commands before executing them. This usage of .SILENT is supported only for historical compatibility. We recommend you use the more selective ways to silence specific commands. (See section Command Echoing9). If you want to silence all commands for a particular run of make, use the -s or --silent option (See section Summary 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


  1. See viper.pe.kr/make-ko/make-ko_10.html#SEC102 in Viper.pe.kr-make-ko.7z ↩

  2. See viper.pe.kr/make-ko/make-ko_10.html#SEC101 in Viper.pe.kr-make-ko.7z ↩

  3. See viper.pe.kr/make-ko/make-ko_10.html#SEC103 in Viper.pe.kr-make-ko.7z ↩

  4. See viper.pe.kr/make-ko/make-ko_5.html#SEC48 in Viper.pe.kr-make-ko.7z ↩

  5. See viper.pe.kr/make-ko/make-ko_10.html#SEC93 in Viper.pe.kr-make-ko.7z ↩

  6. See viper.pe.kr/make-ko/make-ko_10.html#SEC93 in Viper.pe.kr-make-ko.7z ↩

  7. See viper.pe.kr/make-ko/make-ko_10.html#SEC93 in Viper.pe.kr-make-ko.7z ↩

  8. See viper.pe.kr/make-ko/make-ko_5.html#SEC47 in Viper.pe.kr-make-ko.7z ↩

  9. See viper.pe.kr/make-ko/make-ko_5.html#SEC44 in Viper.pe.kr-make-ko.7z ↩

  10. See viper.pe.kr/make-ko/make-ko_9.html#SEC88 in Viper.pe.kr-make-ko.7z ↩

  11. See viper.pe.kr/make-ko/make-ko_5.html#SEC51 in Viper.pe.kr-make-ko.7z ↩