What is the name of the special Makefile variable that contains the match of %
, to use in the rule body?
As an example, I would like to use it like this:
%.o: %.c
@echo Matched $MATCH
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
where I put $MATCH
there because I can't remember the actual name of that special pattern-match variable.
In other words, if the user says make foo.c
I want to output Matched foo
.
I didn't find it here, but I it exists because I've used it before ...