I can never remember all of the automatic variables
that can be used in a Makefile
so here is a table of them.
Variable | Description |
---|---|
$@ |
File name of the target of the rule |
$% |
Target member name, when the target is an archive member |
$< |
Name of the first prerequisite |
$? |
Name of all prerequisites that are newer than the target |
$^ |
Names of all the prerequisites, with spaces between them |
$+ |
Like $^ , but prerequisites listed more than once are duplicated in the order they were listed in the makefile |
$| |
Names of all the order-only prerequisites, with spaces between them |
$* |
Stem with which an implicit rule matches |