Follow-up Comment #2, bug #40657 (project make): This is now in the NEWS file as:
* WARNING: Backward-incompatibility! Contrary to the documentation, suffix rules with prerequisites were being treated BOTH as simple targets AND as pattern rules. Behavior now matches the documentation, and pattern rules are no longer created in this case. The documentation being https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html which says: Suffix rules cannot have any prerequisites of their own. If they have any, they are treated as normal files with funny names, not as suffix rules. To my surprise, I find myself maintaining a Makefile which now knows only how to build a file implausibly called .c.o (to use the documentation's example). I was in the unusually lucky position of having read the NEWS file recently. I fear we're in for some griping here from those who spend more than the five minutes of head scratching it took me. I wonder about a diagnostic. Famous last words but, by the look of the code-change that accompanied the NEWS one, it doesn't look like it would be too hard. If this never bites anyone but me, then it won't have been worth even that effort. The chances that anyone has created a rule that looks like a suffix rule but intentionally isn't one are, at the moment, very close to zero, because they'd have to be using an unreleased version of Make. If we leave it now, though, but come to add a diagnostic when the moans get too loud, then someone might have used it. Then we might feel bound to add a flag to silence the warning, which is surely more trouble than this is worth. The OP here shows that the prerequisites were being attached to the file with the funny name, which is clearly not what the author intended, at least in the example I'm faced with. Attaching the prerequisites to the generated pattern rule, wouldn't that be the best of all worlds? He said, idly, not volunteering a patch. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?40657> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make