On 2024-05-14 17:02, Bob Friesenhahn wrote: > Since it is not allowed to wrap a target replacement in an Automake > condition, I am finding it necessary to write new rules which use > variables that I define.
I think it works despite the strange warning about multiple targets? But regardless, you can use conditionals around commands in a target, instead of the target itself, so you could presumably avoid the problem overriding rules that way, e.g.: foo$(EXEEXT): if MY_CONDITION do stuff else do different stuff endif Then you only get the warning about overriding a builtin rule. No idea how much that helps with your problem though. Cheers, Nick