[Top][All Lists]

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

Re: automake & flex's -P option

From: Akim Demaille
Subject: Re: automake & flex's -P option
Date: Tue, 18 Mar 2003 10:24:21 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2

 Richard> But won't that break the automake rules? They expect the lex
 Richard> output file to be called $LEX_OUTPUT_ROOT. $LEX_OUTPUT_ROOT
 Richard> is different on Linux than DJGPP (lex.yy vs. lexyy). If I
 Richard> use %option outfile and %option prefix, it will work on one
 Richard> platform, but not the other. I thought about getting
 Richard> config.status to do some substitution on the lexer sources,
 Richard> but that's just horrible and it means that the user would
 Richard> have to have (f)lex installed.

I think a lot could be done to improve the interface provided that we
require Bison and Flex.  The problem here stems on the willingness to
be yacc/lex portable.

 Richard> So, back to my original suggestion: Modify the automake
 Richard> rules to invoke lex with the -t option and pipe the output
 Richard> to $LEX_OUTPUT_FILE. Then the use -P or %option prefix will
 Richard> not break the automake rule. But how portable is 'lex -t'?

I don't think this is the right track, since flex and bison now
generate more that just one file.  Relying on something like -o is
saner, but stdout is a dead end.

reply via email to

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