-
Notifications
You must be signed in to change notification settings - Fork 2
Description
POSIX defines substitutions:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html#tag_20_76_13_05
Macro expansions using the forms$(string1 [: subst1 =[ subst2 ]])
or${ string1 [: subst1 =[ subst2 ]]}
can be used to replace all occurrences of subst1 with subst2 when the macro substitution is performed. The subst1 to be replaced shall be recognized when it is a suffix at the end of a word in string1 (where a word, in this context, is defined to be a string delimited by the beginning of the line, a , or a ). If string1 in a macro expansion contains a macro expansion, the results are unspecified. If a character appears as part of subst1 or subst2 after any macros have been recursively expanded, the results are unspecified.
if subst2
is omitted, dmake incorrectly throws an error.
Makefile:
foo.o:
echo $(@:.o=)
$ dmake
dmake: Error: -- Incomplete macro expression [)]