Re: AC_PROG_YACC
"Mark D. Baushke" <[email protected]>
| Newsgroups | gmane.comp.lib.gnulib.bugs,gmane.comp.version-control.cvs.bugs,gmane.comp.sysutils.autoconf.bugs |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul Eggert <[email protected]> writes: > "Mark D. Baushke" <[email protected]> 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. Okay. > > 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. Thanks. > > 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 particularly http://www.opengroup.org/onlinepubs/007908799/xcu/make.html ??? > 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 http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/usr.bin/make/compat.c?rev=HEAD&content-type=text/plain 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"? .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: http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.bin/make/compat.c?rev=HEAD&content-type=text/plain it seems to have the same basic "sh -e" happening in CompatRunCommand(). Similarly with NetBSD make sources here: http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/usr.bin/make/compat.c?rev=HEAD&content-type=text/plain -- Mark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQFAmKFF3x41pRYZE/gRArxOAKCKNzui1y0GB465+A+BEXrPiB1TdACffizc YXLv3FvtQJzfe1uI5H0GFig= =7iJN -----END PGP SIGNATURE-----