Dependancy issue the Lex / Yacc / Automake

Martijn van Oosterhout kleptog at svana.org
Thu Mar 21 15:13:00 EST 2002


On Thu, Mar 21, 2002 at 02:19:17PM +1100, Michael Still wrote:
> On Wed, 20 Mar 2002, Martin Schwenke wrote:
> > 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).

There should be a place for this in the Makefile somewhere. This file needs
to be deleted whenever there is a make clean.

>  - how do I get bison to run before flex? Bison builds y.tab.h, which I
> need to include in lexer.l so I have all the tokens defined.

I seem to remember doing this by saying that lexer.o depended on bison.y or
y.tab.h. I think it's lexer.c that needs it, not lexer.l but I may be wrong
there.

Maybe it's lexer.c that depends on y.tab.h.

HTH,
-- 
Martijn van Oosterhout <kleptog at svana.org>   http://svana.org/kleptog/
> Ignorance continues to thrive when intelligent people choose to do
> nothing.  Speaking out against censorship and ignorance is the imperative
> of all intelligent people.




More information about the linux mailing list