bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make removes trailing '/' when dir does not exists


From: Sam Ravnborg
Subject: make removes trailing '/' when dir does not exists
Date: Wed, 5 Apr 2006 23:57:51 +0200
User-agent: Mutt/1.5.11

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]