3 ms·
The confirmed answer looks correct to me. I think your last comment on it is also correct. The example from the GNU Make manual for SECONDEXPANSION uses patsub
by ploxiln 12y ago
The confirmed answer looks correct to me. I think your last comment on it is also correct.
The example from the GNU Make manual for SECONDEXPANSION uses patsubst but is not a pattern rule.
You tried to use it with a pattern rule, but then the pattern rule interfered with the % in the patsubst, replacing it before the second expansion, which is when the patsubst ran.
All that said... you could probably re-architect your Makefile a bit to make it simpler. I bit more verbosity might be worth it to avoid SECONDEXPANSION tricks.