On 2023-01-04, Mike Frysinger <vap...@gentoo.org> wrote: [...] > dmake is one implementation that fails, and your suggestion doesn't work > :/. > $ dmake foo/bar.o > dmake: Error: -- Incomplete macro expression [)' b='$(at_f:.o=)'; test > x"$$a.o" = x"$(@F)" || a=$$b;\ > echo $$a]
It might also be worth considering that all of these issues go away if we can arrange the rules to use plain $(*F) instead of doing suffix substitution on $(@F). I think this code is used in both suffix and target rules, and $(*F) is only valid in the former, but perhaps Automake can just substitute the appropriate literal string into generated target rules? I'm not familiar with how Automake actually uses this code to generate rules, so maybe this is not a workable idea. Cheers, Nick