From 04f0a3a850a94eb8837ddcef31303968240d1c31 Mon Sep 17 00:00:00 2001 From: Patric Mueller Date: Fri, 11 Sep 2020 12:52:47 +0200 Subject: [PATCH] Fix compilation with bison 3.7 This is a hacky way to support both bison >= 3.7 and < 3.7. Using "%define api.header.include" (see PR #37) would be the correct way to fix it but this makes it incompatible to earlier bison versions. --- ChangeLog | 5 ++++- sys/autoconf/Makefile.utl | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 39b5b376c..58faa882c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -69,7 +69,6 @@ - Fix map overdrawing statuslines on screens with 24 lines (found by Mandevil) - Fix crash when changing statuslines to 3 on screens with 24 - Show Elbereth statusline indicator when blind and flying - - Fix compiling with -fno-common - OPTIONS=truecolor_separator was incorrectly parsed - Bag of holding explosion also scatters contents of inserted container - Fix some bit shift warnings @@ -83,6 +82,10 @@ - Gold field in xlogfile didn't include stashed gold for GOLDOBJ - Observing tamed dragon's breathing didn't identify the dragon (reported by Thidwick) + * build fixes: + - Fix compiling with -fno-common + - Fix compilation with bison 3.7 + 2019-01-01 UnNetHack 5.2.0 * Support SOURCE_DATE_EPOCH for reproducible builds (patch from Debian) * Players killed by Nazgul will arise as Barrow Wights in bones files diff --git a/sys/autoconf/Makefile.utl b/sys/autoconf/Makefile.utl index 113b1d7f3..ff592a31b 100644 --- a/sys/autoconf/Makefile.utl +++ b/sys/autoconf/Makefile.utl @@ -236,9 +236,10 @@ lev_lex.o: lev_lex.c $(HACK_H) ../include/lev_comp.h ../include/sp_lev.h ../include/lev_comp.h: lev_yacc.c lev_yacc.c: $(srcdir)/lev_comp.y + rm -f lev$(YTABH) $(YACC) $(YACCDIST) -b lev -d $(srcdir)/lev_comp.y mv lev$(YTABC) lev_yacc.c - mv lev$(YTABH) ../include/lev_comp.h + cp lev$(YTABH) ../include/lev_comp.h lev_lex.c: $(srcdir)/lev_comp.l rm -f lev_$(LEXYYC) @@ -267,9 +268,10 @@ dgn_lex.o: dgn_lex.c $(CONFIG.H) ../include/dgn_comp.h ../include/dgn_file.h ../include/dgn_comp.h: dgn_yacc.c dgn_yacc.c: $(srcdir)/dgn_comp.y + rm -f dgn$(YTABH) $(YACC) $(YACCDIST) -b dgn -d $(srcdir)/dgn_comp.y mv dgn$(YTABC) dgn_yacc.c - mv dgn$(YTABH) ../include/dgn_comp.h + cp dgn$(YTABH) ../include/dgn_comp.h dgn_lex.c: $(srcdir)/dgn_comp.l rm -f dgn_$(LEXYYC)