[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lex implicit rule chain is broken

From: Philip Guenther
Subject: Re: lex implicit rule chain is broken
Date: Sat, 18 May 2019 23:13:36 -0900

On Sat, May 18, 2019 at 10:30 PM Mohamed Akram <address@hidden> wrote:
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 this output:

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

Philip Guenther

reply via email to

[Prev in Thread] Current Thread [Next in Thread]