automake-patches
[Top][All Lists]
Advanced

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

Re: Better bison support in Automake (was: Re: FYI: master: calc++: rely


From: Akim Demaille
Subject: Re: Better bison support in Automake (was: Re: FYI: master: calc++: rely on Automake)
Date: Thu, 16 Feb 2012 12:25:40 +0100

Le 16 févr. 2012 à 11:21, Stefano Lattarini a écrit :

> Hi Akim.

Hi!

> Thanks, fixed (see attached patch).
> 
>> But maybe automake no longer needs this?
>> 
> It still need it; without that, no header file will be generated from
> the '.y' files (this is a feature, not a bug).
> 
>> If it does, it would be good to recognize also --defines.
>> 
> Maybe; but then, it should be done right, i.e., automake should also
> understand hand handle the '--defines=my-hdr.h' usage.  But I guess
> this would conflict with ylwrap in some way, sigh :-(
> 
> Maybe it's truly time to introduce a new AM_PROG_BISON macro that
> will cause automake to drop all the cruft related to POSIX yacc
> compatibility ...  As usual, patches welcome ;-)

One of the problems that you would face is that it's hard
to know what files will be created by Bison.  Actually,
bison and only bison can know.  For instance currently
for C++ it generates stack.hh and other files that users
find painful to deal with, so I plan to have them go
into the generated *.cc file, upon user request.  This is
not something automake should know.

What would be your preferred option?  Would you like some sort
of --dry-run option that would in addition send the list of created
files on stdout?  Or an option to generate an additional file
with the list of the generated files during the normal run?
Or a Makefile snippet a la -M.

FWIW, I also use a wrapper around Bison, for several reasons:
I like to see the diffs, I want to run xsltproc to get the HTML
report, I want to keep old timestamps when possible, I'd like
to "optimize" some part of the output, etc.

Someone might find them useful, so here they are.

Attachment: bison++.in
Description: Binary data

Attachment: fuse-switch
Description: Binary data


reply via email to

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