bug-make
[Top][All Lists]
Advanced

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

Can't call targets ending with "/" on make invocation


From: Bartłomiej Palmowski
Subject: Can't call targets ending with "/" on make invocation
Date: Tue, 24 Sep 2013 11:57:38 +0200

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)

reply via email to

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