Dependancy issue the Lex / Yacc / Automake

Michael Still mikal at
Thu Mar 21 14:19:17 EST 2002

On Wed, 20 Mar 2002, Martin Schwenke wrote:

> >>>>> "Mikal" == Michael Still <mikal at> writes:
>     Mikal> I have a simple lex and yacc project I am trying to
>     Mikal> Automakify. The looks like:
>     Mikal> noinst_PROGRAMS = lexer
>     Mikal> lexer_SOURCES = lexer.y lexer.l
>     Mikal> When I build the code, it would seem that it goes straight
>     Mikal> to a gcc ... -c lexer.c, instead of running lex and yacc
>     Mikal> first.
> It isn't something as simple as having a newer lexer.c than
> lexer.{y,l}, is it?

This certainly stops flex from running at the start of the compile.

So, I have two further questions:
 - how do I clean lexer.c so that flex can run at the start (but perhaps
only when in Maintainer mode or something like that so that users don't
have to have flex and bison).
 - how do I get bison to run before flex? Bison builds, which I
need to include in lexer.l so I have all the tokens defined.

Any hints?


Michael Still (mikal at     UMT+11hrs

More information about the linux mailing list