Follow-up Comment #1, bug #56892 (project make): It is definitely not the case that we can ignore -include if the makefile doesn't exist. In fact until recently, virtually every makefile that needed to be rebuilt would be included with "-include", because otherwise you'd get a warning that the file didn't exist before make would try to build it.
Only as of GNU make 4.2 will the warning be delayed until after make decides whether it can be made so you don't need to use -include but lots and lots of makefiles still do it. See bug #102. I'm not sure I see how your option #2 helps. If I understand your setup correctly it's not that make is ever re-execing itself even once. What happens is that make tries to rebuild nosuchfile.mk and finds a match-anything rule that runs a recursive make, the recursive make tries to rebuild nosuchfile.mk and finds a match-anything rule that runs a recursive make, etc. None of these sub-makes ever exit so we never re-exec ourselves. In other words, it's not that the same make is re-execing itself forever but that each instance of make is forking a new child make that forks another new child make, etc. until presumably the system freaks out. In other words this seems like a fork bomb. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?56892> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make