URL:
<https://savannah.gnu.org/bugs/?58639>
Summary: Shortest stem not matched
Project: make
Submitted by: milesf
Submitted on: Sun 21 Jun 2020 10:39:50 PM 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: None
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
With this makefile:
foo/%/baz:
@echo "Prereq - stem $*"
foo/%/baz/thing.txt: foo/%/baz
@echo "Good match - stem $*"
foo/%:
@echo "Bad match - stem $*"
I'd expect the shortest stem (bar) to be matched as follows:
> make foo/bar/baz/thing.txt
Prereq - stem bar
Good match - stem bar
However, it matches the longer stem (bar/baz/thing.txt) instead:
> make foo/bar/baz/thing.txt
Bad match - stem bar/baz/thing.txt
The makefile works as expected if either removing the "Bad match" rule or the
prerequisite from the "Good match" rule.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58639>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/