This is with GNU Make 3.80

Consider following Makefile:

.PHONY: $(MAKECMDGOALS)

$(MAKECMDGOALS):
        @echo $@

As expected it prints out the targetname when supplied with a filename
as parameter (no matter if the file exists or not):
make foo.c => foo.c

When I try specifying an existing directory then is it also ok:
make foo/ => foo/

When I try to specify a non-existing directory it no longer works:
make bar/ => make: *** No rule to make target `bar/'.  Stop.

Digging a bit further I realised that make will drop the final '/' for
non-existing directiories but I fail to see why it does so.

A bug or a feature?

        Sam


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to