Automake flex bison

Martijn van Oosterhout kleptog at svana.org
Mon Nov 19 10:19:28 EST 2001


On Sun, Nov 18, 2001 at 06:58:15PM +0000, Andreas Bauer wrote:
> Hi all
> 
> Can anybody tell me how I get bison to be invoked before flex, when I
> have both test.yy and test.ll in the SOURCES section of my Makefile.am?
> 
> Whatever I do, flex always starts before bison. :-(

Well, I don't have an example here so I can't be sure about the syntax but
it's something along the lines of:

lex.yy.c: test.ll test.tab.h
	flex ...

test.tab.c test.tab.h: test.yy
	bison ...

Or something like that. However, I don't remember there being an issue with
whether you run flex or bison first. However, bison does need to be run
before you can compile the lex output. That can be acheived much more easily
by declaring the dependancy:

lex.yy.o: lex.yy.c test.tab.h

HTH,
-- 
Martijn van Oosterhout <kleptog at svana.org>
http://svana.org/kleptog/
> Magnetism, electricity and motion are like a three-for-two special offer:
> if you have two of them, the third one comes free.




More information about the linux mailing list