[bug #62162] patsubst not working in prerequisites under .SECONDEXPANSION

2022-03-10 Thread Mikhail
Follow-up Comment #5, bug #62162 (project make): Oh, I got it now, % expands as a stem of static pattern rule, and not being used by patsubst. The issue is resolved. Thanks, Mikhail ___ Reply to this item at:

[bug #62162] patsubst not working in prerequisites under .SECONDEXPANSION

2022-03-10 Thread Mikhail
Follow-up Comment #4, bug #62162 (project make): Thanks, _$$(percent)_ trick makes the job done. However what is happening is still obscure. For example, here _patsubst_ does everything correctly lib1_SRCS := main.c try.c test.c lib2_SRCS := lib.c api.c .SECONDEXPANSION: lib1 lib2:

[bug #62162] patsubst not working in prerequisites under .SECONDEXPANSION

2022-03-10 Thread Dmitry Goncharov
Follow-up Comment #3, bug #62162 (project make): A typo, ofcourse should be $$(percent) percent:=% $(files) : %.ext : $$(patsubst r$$(percent),$$(percent),$$(lastword $$(subst .stem., ,$$*)))-prereq ___ Reply to this item at:

[bug #62162] patsubst not working in prerequisites under .SECONDEXPANSION

2022-03-10 Thread Dmitry Goncharov
Follow-up Comment #2, bug #62162 (project make): You can store % in a variable percent:=% $(files) : %.ext : $$(patsubst r$(percent),$(percent),$$(lastword $$(subst .stem., ,$$*)))-prereq ___ Reply to this item at:

[bug #62162] patsubst not working in prerequisites under .SECONDEXPANSION

2022-03-10 Thread Andreas Schwab
Follow-up Comment #1, bug #62162 (project make): The replacement of % by the stem happens before the secondary expansion is performed. ___ Reply to this item at:

[bug #62162] patsubst not working in prerequisites under .SECONDEXPANSION

2022-03-10 Thread anonymous
URL: Summary: patsubst not working in prerequisites under .SECONDEXPANSION Project: make Submitted by: None Submitted on: Thu 10 Mar 2022 10:06:34 AM UTC Severity: 3 - Normal