On Tue, Nov 5, 2024 at 8:55 AM WaitronCharm via Bug reports and discussion for GNU make <bug-make@gnu.org> wrote: > Is there any design rationale why 'make' does not like applying the same > pattern rule more than once for the same target?
Maybe the authors had some other reason, but the only reason i can see today for implicit rules (other than match-anything rules) is avoidance of infinite recursion in cases like the following all: hello.tsk %.tsk: %.o; $(info hello.tsk) %.o: %.c %.tsk; $(info hello.c) > I am sure there are legitimate cases where recursively (but not infinitely) > applying pattern rules should be useful. How do you teach make to allow some, but not infinite recursion? > Could this restriction be relaxed with an extra command line option? A command line switch may not be the best option here. No user will know to specify the switch. A better option is a special target. A special target is mentioned in the makefile and relieves the user from knowing or specifying a switch. > Or, this would create complications (internal logic, graph structures etc.)? i don't see complications, as long as the behavior of match-anything rules stays intact. regards, Dmitry