Thanks for the tip. I'm not sure why it doesn't just fail immediately then, instead of taking a few steps and stumbling on itself.
In order to fail early, make would have to assume it knows more than you do, but it's just a dumb program and you might be doing something unusual but perfectly legal. How can make know whether the compiler/link on your system does something special with .l files, beyond the normal interpretation as lex files?
Just out of curiosity, I tested the same thing with FreeBSD make (`LDFLAGS=-ll make`) and it compiled `lang` as expected with
The short answer is that FreeBSD make uses '$<' in the recipe of the applicable .c: pattern rule, while GNU make use '$^' in the parallel rule.
Note that FreeBSD make doesn't actually require the dependency: you get the same results when the makefile is just