diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | Makefile.in | 12 | ||||
-rw-r--r-- | README | 11 | ||||
-rw-r--r-- | bisonfix.awk | 43 |
5 files changed, 24 insertions, 67 deletions
@@ -1,3 +1,16 @@ +2017-09-13 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (command.c): Don't need the dependency on awkgram.c + anymore. + * bisonfix.awk: Removed. + * README: Revised to describe use of Bison exclusively. + +2017-09-13 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * Makefile.am (awkgram.c): Use -o option to bison. Get rid of + messing with y.tab.h, that was obsolete. + (EXTRA_DIST): Don't need bisonfix.awk anymore. + 2017-09-12 Petr Ovtchenkov <ptr@void-ptr.info> Andrew J. Schorr <aschorr@telemetry-investments.com> diff --git a/Makefile.am b/Makefile.am index 1040a77e..0089b862 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,6 @@ EXTRA_DIST = \ NEWS.0 \ POSIX.STD \ README_d \ - bisonfix.awk \ config.guess \ config.rpath \ config.sub \ @@ -183,17 +182,12 @@ dist-hook: cp "$(srcdir)"/pc/config.h "$(distdir)"/pc/config.h # Special rules for individual files -# Use of awk instead of $(AWK) is deliberate, in case gawk doesn't build -# or work correctly. awkgram.c: awkgram.y - $(YACC) $(AM_YFLAGS) $(YFLAGS) $< - sed 's/parse error/syntax error/g' < y.tab.c | awk -f "$(srcdir)"/bisonfix.awk awkgram > $*.c && rm y.tab.c - if test -f y.tab.h; then \ - if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ - else :; fi + $(YACC) -o $@ $(AM_YFLAGS) $(YFLAGS) $< + sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@ -command.c: command.y awkgram.c +command.c: command.y $(YACC) -o $@ -p zz $< sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@ diff --git a/Makefile.in b/Makefile.in index e978a6e1..ade98358 100644 --- a/Makefile.in +++ b/Makefile.in @@ -461,7 +461,6 @@ EXTRA_DIST = \ NEWS.0 \ POSIX.STD \ README_d \ - bisonfix.awk \ config.guess \ config.rpath \ config.sub \ @@ -1193,17 +1192,12 @@ dist-hook: cp "$(srcdir)"/pc/config.h "$(distdir)"/pc/config.h # Special rules for individual files -# Use of awk instead of $(AWK) is deliberate, in case gawk doesn't build -# or work correctly. awkgram.c: awkgram.y - $(YACC) $(AM_YFLAGS) $(YFLAGS) $< - sed 's/parse error/syntax error/g' < y.tab.c | awk -f "$(srcdir)"/bisonfix.awk awkgram > $*.c && rm y.tab.c - if test -f y.tab.h; then \ - if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ - else :; fi + $(YACC) -o $@ $(AM_YFLAGS) $(YFLAGS) $< + sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@ -command.c: command.y awkgram.c +command.c: command.y $(YACC) -o $@ -p zz $< sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@ @@ -34,14 +34,13 @@ have read and didn't, and you bug me about it, I'm going to yell at you. See the file INSTALL for installation instructions. -If you have neither Bison nor yacc, use the awkgram.c file here. It was +If you don't have neither Bison, use the awkgram.c file here. It was generated with Bison, and has no proprietary code in it. (Note that -modifying awkgram.y without Bison or yacc will be difficult, at best. -You might want to get a copy of Bison from the FSF too.) +modifying awkgram.y without Bison will be difficult, at best. You might +want to get a copy of Bison from the FSF too.) -Since there are two parsers in gawk (one for the grammar, one for the -debugger), there is a dependency on Bison's ability to rename the -yacc internal variables. So, you should really use Bison and not yacc. +The build mechanics depend upon Bison. Also, gawk doesn't work correctly +with some versions of yacc, so just use Bison. If you have an MS-DOS, MS-Windows, or OS/2 system, use the stuff in the `pc' directory. Similarly, there is a separate directory for VMS. diff --git a/bisonfix.awk b/bisonfix.awk deleted file mode 100644 index 87fe9ee9..00000000 --- a/bisonfix.awk +++ /dev/null @@ -1,43 +0,0 @@ -# bisonfix.awk --- tweak awkgram.c for stupid compilers. - -# Copyright (C) 2005, 2009, 2013 the Free Software Foundation, Inc. -# -# This file is part of GAWK, the GNU implementation of the -# AWK Programming Language. -# -# GAWK is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# GAWK is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - -BEGIN { sfile = ARGV[1] ; ARGV[1] = "-" ; ARGC = 2 } - -# 2/2013: Comment this out to see if any system still needs it. -# /^#if.*\\$/ { -# line = $0 -# sub(/\\$/, "", line) -# getline line2 -# while (line2 ~ /\\$/) { -# line = line line2 -# sub(/\\$/, "", line) -# getline line2 -# } -# line = line line2 -# sub(/\\$/, "", line) -# print line -# next -# } - -/^#line.*y\.tab\.c/ { sub(/y.tab/, sfile) } - -{ print } - |