This section summarizes internal macros, modifiers, string substitution, and special macros.
$? | The list of prerequisites that have been changed more recently than the current target. Can be used only in normal description file entries -- not suffix rules. |
$@ | The name of the current target, except in description file entries for making libraries, where it becomes the library name. Can be used both in normal description file entries and in suffix rules. |
$$@ | The name of the current target. Can be used only to the right of the colon in dependency lines. (May not work on all versions of make.) |
$< | The name of the current prerequisite that has been modified more recently than the current target. Can be used only in suffix rules and in the |
$* | The name -- without the suffix -- of the current prerequisite that has been modified more recently than the current target. Can be used only in suffix rules. |
$% | The name of the corresponding |
Macro modifiers are not available in all variants of make.
D
The directory portion of any internal macro name except $?
. Valid uses are:
$(*D) $$(@D) $(<D) $(%D) $(@D)
F
The file portion of any internal macro name except $?
. Valid uses are:
$(*F) $$(@F) $(<F) $(%F) $(@F)
String substitution is not available in all variants of make.
$(
macro:
s1=
s2)
Evaluates to the current definition of $(
macro)
, after substituting the string s2 for every occurrence of s1 that occurs either immediately before a blank or tab, or at the end of the macro definition.