January 16, 2008

Makefile Variables

A summary of the automatic variables. See Automatic Variables, for full information (taken from GNU Make Manual).
$@
The file name of the target.
$%
The target member name, when the target is an archive member.
$<
The name of the first prerequisite.
$?
The names of all the prerequisites that are newer than the target, with spaces between them. For prerequisites which are archive members, only the member named is used (see Archives).
$^
$+
The names of all the prerequisites, with spaces between them. For prerequisites which are archive members, only the member named is used (see Archives). The value of $^ omits duplicate prerequisites, while $+ retains them and preserves their order.
$*
The stem with which an implicit rule matches (see How Patterns Match).

No comments:

Post a Comment