Standard LEX variable doesn't work in Make.
Tue Nov 22 21:16:00 GMT 2016
Am 21.11.2016 um 17:57 schrieb Kaz Kylheku:
> I'm changing a FOSS project to rely more on standard Make
> vars such as CC and CFLAGS and such: use $(CC) for
> the compiler unless told otherwise, incorporate $(CFLAGS)
> if it is defined, and so forth. This is friendly toward
> distro package maintainers.
Not really. Package maintainers will almost universally expect your
source to have some kind of 'configure' script, which would take of this
and most other such properties for you.
> Anyway, even though my Cygwin installation has GNU Flex,
> the lex command is nonexistent; thus the $(LEX) Make
> variable fails.
It's not $(LEX) that's failing here; it's the way you form expectations
about what $(LEX) is supposed to be. The value of $(LEX) is clearly
documented to default to 'lex' (see "info make implicit implicit").
> If the installation has some sort of lex, the
> predefined $(LEX) variable should resolve to it.
No. LEX is a modifiable variable, for the express purpose that it be
set to what the system actually needs. Yes, that means _you_ are
supposed to do that (or to set up tools outside make to do it for you).
Morale: Make is not autoconf, nor does it want to be.
One final note: your report is in no way specific to Cygwin, so this is
almost certainly the wrong mailing list to send it to.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin