$(RM)
is a reference to a "make" variable (or macro in POSIX lingo). These come in two syntax flavors, with identical semantics: $(NAME)
and ${NAME}
(and there are one letter macros not needing parentheses, such as $a
).
POSIX specifies many variables, errrrr, macros, to have a default:
MAKE=make
AR=ar
ARFLAGS=-rv
YACC=yacc
YFLAGS=
LEX=lex
LFLAGS=
LDFLAGS=
CC=c99
CFLAGS=-O 1
FC=fort77
FFLAGS=-O 1
GET=get
GFLAGS=
SCCSFLAGS=
SCCSGETFLAGS=-s
Interestingly, RM
isn't one of them.
The default value for the RM
variable in your make implementation apparently is rm -f
(and your make runs in non-POSIX mode by default).
Note that while $(PWD)
has the same syntax as a shell command substitution (and ${PWD}
the same as a shell parameter), they are completely different things. To answer your question, no, you can't expect $(PWD)
as a "make" macro to run the pwd
utility or expand to the current working directory. An undefined macro will be expanded to an empty string without "make" even raising an eyebrow.