bugmake - Bugs: bug #24487, "foo" should not be...


bug #24487: "foo" should not be identified with "./foo" if foo is phony

Submitted by:  Stepan Kasal <kasal>
Submitted on:  Wed 08 Oct 2008 05:34:14 PM UTC  
Severity: 3 - NormalItem Group: Bug
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 3.82Operating System: Any
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Fri 30 Sep 2016 01:31:47 PM UTC, comment #3:

This problem is now worse because it is not allowed to mix implicit and normal rules:

$ cat Makefile
% build:
echo $@

.PHONY: build
$ make build
Makefile:1: *** mixed implicit and normal rules. Stop.

So now one is forced to declare the targets multiple times.

Felipe Sateler <fsateler>
Mon 10 Oct 2011 12:35:37 PM UTC, comment #2:

I noticed the same problem with

.PHONY: %.e


-> make: Nothing to be done for ´target´.

I would be terribly happy if you guys could fix that.

Mon 12 Sep 2011 09:48:17 AM UTC, comment #1:

Is this perhaps the bug that causes the problems discussed at


Quoting here so that you don't need to browse off-site:

.PHONY: build
dh $@

What do you think happens when you run debian/rules build in a directory containing a build file or directory?

make: Nothing to be done for `build’.

However, an explicit rule, like the following, works:

.PHONY: build
dh $@

It happens that many of the packages I maintain contain a build subdirectory in their source. As such, to work around the aforementioned issue, I just declared the dh rules explicitely, as in:

.PHONY: build binary binary-arch binary-indep (...)
build binary binary-arch binary-indep (...):
dh $@

And this obviously doesn’t scale for new rules such as build-arch and build-indep.

Timo Lindfors <lindi>
Wed 08 Oct 2008 05:34:14 PM UTC, original submission:

The target "./foo" is usually the same as "foo", since the file is the same.

But is this necessary also for phony targets?

(This issue was noticed when a make compiled with --enable-case-insensitive-file-system confused the phony target "install" with the rules for file "INSTALL".)

Stepan Kasal <kasal>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by fsateler (Posted a comment)
  • -unavailable- added by psmith (Updated the item)
  • -unavailable- added by lindi (Posted a comment)
  • -unavailable- added by kasal (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 09 Oct 2013 05:03:40 AM UTCpsmithComponent Version4.0=>3.82

    Back to the top

    Powered by Savane 3.1-cleanup