bug-automake
[Top][All Lists]
Advanced

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

bug#7648: Automake yacc support, GNU bison, and non-standard generated h


From: Stefano Lattarini
Subject: bug#7648: Automake yacc support, GNU bison, and non-standard generated headers
Date: Fri, 5 Aug 2011 12:50:43 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Thursday 28 July 2011, Iain Nicol wrote:
> Hi Stefano,
>
Hi Iain, thanks for the answer (and sorry for the delay).

> On 2011-05-12, Stefano Lattarini wrote:
> > I decided that, after all, the best thing to do was to rewrite the
> > messy ylwrap script; after some work, I've now reached a point where I
> > think we could safely add, without too much hassle, a new feature,
> > that will allow the developer to specify a list of extra headers
> > generated by a yacc call.
> 
> > I'm not yet sure about the syntax to use for this new feature, though;
> > I was thinking about sometinh on the lines of:
> 
> >  bin_PROGRAMS = zardoz
> >  zardoz_SOURCES = zardoz.yy
> >  zardoz_YFLAGS = -d --skeleton lalr1.cc
> >  EXTRA_zardoz_YACC_HEADERS = stack.hh location.hh position.hh
> 
> > but I'd like to hear more ideas and opinions on this matter before
> > proceeding.
> 
> Well, I'll give commenting a shot: that sounds pretty sensible to me.
> But I must point out that I speak with limited Automake experience...
> 
> One thing which did strike me: EXTRA_ might not be the best prefix for
> YACC_HEADERS.  If you do a ``make dist'' on a C Bison project then of
> course zardoz.h is included in the dist tarball, which AFAICT is GNU
> Coding Standards encouraged behaviour---presumably because installing
> Bison used to be more difficult that it is these days.  It would be
> consistent for the YACC_HEADERS to also end up also in the dist.
>
I agree with what you say, but I don't see how this constitutes a
counter-argument to the use of EXTRA_ as a prefix for YACC_HEADERS.
Remember that EXTRA_ is not used only with EXTRA_DIST, but also
for things like EXTRA_PROGRAMS, that are obviously not meant to be
distributed.

Update: OTOH, quoting from the section "The Uniform Naming Scheme" of
the automake manual:

  For each primary, there is one additional variable named by prepending
  `EXTRA_' to the primary name. This variable is used to list objects
  that may or may not be built, depending on what configure decides.'

This doesn't fit very well with the situation we are talking about, so
`EXTRA_foo_YACC_HEADERS' is not a great name after all ...  Suggestions
on how to change it are welcome.

> Then again, thinking about this some more, I'm probably worrying about
> nothing, aren't I?
>
IMHO, no, you're not; consistency is important, and automake has already
its good share of ugly warts in this area, so that I'd rather avoid
adding new ones.

> Based upon the patch attached to this bug, I gather you can do wildcard
> matching.
>
Which patch are you referring to exactly?

> 
> Regards,
> Iain
 
Thanks,
  Stefano





reply via email to

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