Re: AC_PROG_YACC

Bruno Haible <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs,gmane.comp.sysutils.autoconf.bugs,gmane.comp.version-control.cvs.bugs
Message-ID <[email protected]>
Derek Robert Price wrote:
> It appears that some `make's (notably some BSDs) have a default
> setting for YFLAGS (YFLAGS = -d) that some of my users are not happy
> with.  It breaks builds, notably with the GNULIB getdate package,
> which comes with its own getdate.h header (which gets overwritten by
> calls to `bison -y -d getdate.y'...).  Is this something that
> AC_PROG_YACC (or gl_BISON for the GNULIB folks) should be checking for
> and dealing with?
>
> My workaround will be to just stick a `YFLAGS=' line in my
> Makefile.am, but I thought you might like the bug report.

The automake documentation says:
  "When `yacc' is invoked, it is passed `YFLAGS' and `AM_YFLAGS'.  The
   former is a user variable and the latter is intended for the
   `Makefile.am' author."

So this means, YFLAGS is meant as a variable through which the user can
influence the compilation (like CFLAGS, CPPFLAGS, LDFLAGS etc.). By
setting it to empty, you give the user less freedom.

I'd say, since option '-d' is not appropriate in all cases, it's a mistake
to use it by default. The bug is therefore in the BSD make.

Bruno
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.