It means that if a target is marked as .PHONY
, then it must be an explicit rule, i.e. something like
a.o: a.c
$(CC) -o $@ -c $<
and not an implicit rule, like a pattern rule or a suffix rule. As an example, consider the following makefile:
.PHONY: a.o
all: a.o b.o
%.o: %.c
$(CC) -o $@ -c $<
Invoking make
will do the following:
$ make
cc -o b.o -c b.c
$
Note that only b.c
was compiled, not a.c
.