automake
[Top][All Lists]
Advanced

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

Re: automake & flex's -P option


From: Richard Dawe
Subject: Re: automake & flex's -P option
Date: Mon, 17 Mar 2003 21:20:33 +0000

Hello.

Akim Demaille wrote:
> 
> | Hello.
> 
> Hi!
> 
> | I recently converted one of my projects to autoconf 2.57 & automake
> | 1.7.3. I'm not bothered about portability to systems other than
> | DJGPP or Linux. In particular I've been using switches that are
> | particular to flex and bison: those to set the prefix of the lexer
> | and parser's function and varibable names. This works fine with
> | bison. But not with flex, because it modifies the output file name
> | from lexyy.c to lexfoo.c. ($LEX_OUTPUT_ROOT == lexyy for DJGPP.)
> 
> Nope, use %option outfile in addition to %option prefix.

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

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

Thanks, bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]




reply via email to

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