[Top][All Lists]

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

Re: [Bug-gnulib] AC_PROG_YACC

From: Mark D. Baushke
Subject: Re: [Bug-gnulib] AC_PROG_YACC
Date: Wed, 05 May 2004 01:09:41 -0700

Hash: SHA1

Paul Eggert <address@hidden> writes:

> "Mark D. Baushke" <address@hidden> writes:
> > So, letting the user have much control over YACC at all
> > is going to cause problems due to the requirements for
> > using bison instead of a generic yacc.
> The intent is to let the user specify a particular
> installation of Bison

Adding a --with-bison= configuration option might also work...

> > Perhaps in this case of a bison-only .y file, the rules to
> > build getdate.c should use a BISON="${GL_BISON} -y" with ...
> I'd rather not go down that path.  It's not worth the maintenance
> aggravation.


> > Nor was I aware that the use of a version of 'make'
> > other than 'GNU make' was required and yet, that does
> > appear to be the case being made here.
> I don't see why non-GNU make is required. I use GNU make
> and Solaris make myself, and haven't run into a problem.

Sure. I favor GNU make over Solaris make and clearmake
and a few others. This does not mean that consumers of
our software packages have the same opinions.

> As far as I can tell, the problem lies only in FreeBSD
> 'make' and related 'make's.

For this particular case, you are probably correct.

> >> If fixing CVS time stamps is not enough to fix the problem
> >> in practice, another possibility is to rename getdate.h to
> >> get-date.h.
> >
> > I believe this suggestion has merit in the general case
> Yes, it seems the simplest way to work around all the braindamage
> involved.  If there aren't any other comments I'll submit a patch
> along those lines sometime soon.


> > FWIW: FreeBSD /usr/bin/make runs its shell actions using
> > 'sh -e'
> OK, so that's _another_ way that FreeBSD's "make" doesn't
> conform to POSIX.

Hmmm... I don't have a copy of the 1003.2 POSIX
specification. Are you using something like
http://www.opengroup.org/onlinepubs/007908799/ or more

> I'll submit a patch to the Automake folks to work around that
> compatibility glitch.  However, I'm afraid there are several other
> examples of that usage in Automake and I'll probably miss some of
> them.
> Come to think of it, you mentioned that FreeBSD's 'make' doesn't set
> YFLAGS=-d while in POSIX mode.  Does POSIX mode prevent this "sh -e"
> incompatibility as well? 

Nope. See the CompatRunCommand() function in 

The closest you can get is to either prefix the production
with '-' if you don't care about the condition of the shell
exit, or use the .IGNORE attribute which has the same effect
or use of the -i command-line switch as specified by POSIX
1003.2 requirements...

> Is there any real disadvantage to specifying
> POSIX mode in FreeBSD 'make'? 

If you want POSIX behavior, then you need to add the
.POSIX target. The FreeBSD sys.mk file has this to say:

# If the special target .POSIX appears (without prerequisites or
# commands) before the first noncomment line in the makefile, make shall
# process the makefile as specified by the Posix 1003.2 specification.
# make(1) sets the special macro %POSIX in this case (to the actual
# value "1003.2", for what it's worth).

Of course, my understanding is that the special target
.POSIX: is mandated by 1003.2, but I am not 100% certain
that is true.

> Perhaps we ought to arrange for that instead. That might
> avoid a lot of glitches like this.

If you feel it is desirable, sure. Add .POSIX: to the
generated Makefile.

> Is there some line that we could put at the start of the
> Makefile, or some option, which tells FreeBSD 'make'
> "please don't be gratuitiously incompatible with POSIX"?


> For example, OpenBSD 'make' is compatible by default,
> unless you specify -j without specifying -B. (Or perhaps
> your user was using "make -j" without -B? That might
> explain things.)

Are you sure? Looking at OpenBSD make sources here:


it seems to have the same basic "sh -e" happening in CompatRunCommand().

Similarly with NetBSD make sources here:


        -- Mark
Version: GnuPG v1.2.3 (FreeBSD)


reply via email to

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