bugmake - Bugs: bug #48643, Irrelevant targets can confuse...


bug #48643: Irrelevant targets can confuse make on which pattern rule to select.

Submitted by:  None
Submitted on:  Wed 27 Jul 2016 05:02:12 AM UTC  
Votes:  20  
Severity:  3 - Normal Item Group:  Bug
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  4.2.1 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None

Add a New Comment(Rich Markup)

You are not logged in

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


Tue 23 Aug 2016 08:06:50 AM UTC, comment #1:

According to what I wrote in <https://lists.gnu.org/archive/html/help-make/2016-06/msg00003.html>, this behaviour is present in 3.82, 4.1 and 4.2.1, but not 3.81.

Steven Simpson <simpsons>
Wed 27 Jul 2016 05:02:12 AM UTC, original submission:

This is a based on https://lists.gnu.org/archive/html/help-make/2016-01/msg00011.html which I couldn't find an actual bug report for.

I'm not 100% certain that this is a bug; it's possible that we're missing something subtle in the manual, but I really do think it's a bug.

I've attached a test case. The bad behavior is triggered by the last line in the Makefile; commenting it out causes things to work correctly.

The correct graph for make to choose is

But, if we append this line, then make makes the wrong decision:

The line should be irrelevant, because misleading_target isn't something we're trying to build. But, it causes make to instead choose this graph:

That is, it chose the wrong pattern rule for %.foo .



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

Attach Files:

Attached Files
file #38033:  Makefile added by None (543B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by simpsons (Voted in favor of this item)
  • -email is unavailable- added by simpsons (Posted a comment)

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

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-28 simpsons Carbon-Copy- => Added simpsons
    2016-07-27 None Attached File- => Added Makefile, #38033

    Back to the top

    Powered by Savane 3.4