URL: <https://savannah.gnu.org/bugs/?63359>
Summary: patsubst messes up functions in replacement Project: make Submitter: bertsky Submitted: Sun 13 Nov 2022 05:30:38 PM UTC Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: SCM Operating System: POSIX-Based Fixed Release: None Triage Status: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Sun 13 Nov 2022 05:30:38 PM UTC By: Robert Sachunsky <bertsky> Consider the following Makefile: FOO = a/b/c $(info $(patsubst %/c,%,$(FOO))) $(info $(patsubst %/c,$(notdir %),$(FOO))) $(info $(patsubst %/c,$(dir %),$(FOO))) The following output can be *expected* from that: a/b b a/ make: *** No targets. Stop. However, to my surprise, this is what we *actually* get: a/b a/b ./ make: *** No targets. Stop. It seems like _make_ cannot properly deal with function calls inside substitution references. Since the documentation does not indicate that, and it is certainly unexpected (and a severe limitation for no apparent reason), I would consider this a *bug*. Tested on GNU make v 4.1, 4.3 and git master (rev 11f7198f). _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?63359> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/