[Top][All Lists]

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

Re: Flex and ylwrap -- outmoded?

From: Bob Rossi
Subject: Re: Flex and ylwrap -- outmoded?
Date: Thu, 24 Apr 2008 21:46:58 -0400
User-agent: Mutt/1.5.15+20070412 (2007-04-11)

On Wed, Apr 23, 2008 at 10:07:06PM -0400, Mike Mueller wrote:
> I'm working on a project with a couple flex-generated lexers and an
> automake/autoconf build system.  I've noticed the following:
> Automake runs flex via ylwrap.  ylwrap, according to the manual:
>     A shell script used by an automake generated `Makefile' to run
>     programs like `bison', `yacc', `flex', and `lex'. These programs
>     default to producing output files with a fixed name, and the
>     `ylwrap' script runs them in a subdirectory to avoid file name
>     conflicts when using a parallel make program.
> However, I have a feeling this hasn't been true about flex for a long
> time.  Flex has options that are very useful, including one for
> specifying an output file name (%option outfile="").
> A side-effect of running flex in a ylwrap jail is that I can't generate
> a header file using automake's default .l-file handler.  I specified the
> option header-file="foo.h", but based on the description above, I'm
> assuming the file is generated in a temporary subdirectory, and then
> blasted by ylwrap.
> I'm going to have to hand-write my rule to build flex files, to be able
> to use the most basic features of flex.  Hopefully you guys can pull
> flex out of the special category of programs that need ylwrapping, so
> that in the future, people will be able to use flex more naturally.

It sounds like the new feature I was requesting would solve you problem.

Basically, a way to tell automake that a particular input file,
generates a few output source or header files. Then automake would
automatically build those source/header files from the input file using
the action that you gave it to do so. The action could be a simple shell
script, or in your case, it would be 'flex foo.l'.

Perhaps someone would agree with me...

Bob Rossi

reply via email to

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