Hi,

I've noticed that it is not possible to explicitly call targets ending with
slash on make invocation, please see the following example (and inline
comments):

$ cat makefile_with_slash
foo/:
        echo $@
$ make -f makefile_with_slash
echo foo      # please not that slash is stripped!
foo
$ make -f makefile_with_slash foo # this one works but there is no "foo"
target!
echo foo
foo
$ make -f makefile_with_slash foo/
make: *** No rule to make target `foo/'.  Stop.
$ cat makefile_wo_slash
foo:
        echo $@
$ make -f makefile_wo_slash
echo foo
foo
$ make -f makefile_wo_slash foo
echo foo
foo
$ make -f makefile_wo_slash foo/
make: *** No rule to make target `foo/'.  Stop.
$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-redhat-linux-gnu

(also reproducible on 3.82)
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to