URL:
<http://savannah.gnu.org/bugs/?48643>
Summary: Irrelevant targets can confuse make on which pattern
rule to select.
Project: make
Submitted by: None
Submitted on: Wed 27 Jul 2016 05:02:12 AM UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 4.2.1
Operating System: POSIX-Based
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
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
default -> a.foo (%.foo, line 3) -> a.correct -> a.correct_src
But, if we append this line, then make makes the wrong decision:
misleading_target: a.mislead
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:
default -> a.foo (%.foo, line 6) -> a.mislead -> a.mislead_src
That is, it chose the wrong pattern rule for %.foo .
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 27 Jul 2016 05:02:12 AM UTC Name: Makefile Size: 543B By: None
<http://savannah.gnu.org/bugs/download.php?file_id=38033>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48643>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-make