From 42a18510a3dbfb097a6b3846dcc827c9e902ecf3 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 7 Feb 2016 12:42:13 +0000 Subject: Bison after version 3.0 require different api prefix handling --- src/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 15095de..f6f5055 100644 --- a/src/Makefile +++ b/src/Makefile @@ -15,7 +15,9 @@ $(BUILDDIR)/%-lexer.c $(BUILDDIR)/%-lexer.h: src/%-lexer.l $(BUILDDIR)/%-lexer.c: $(BUILDDIR)/%-parser.h -# Bison 2.6 and later require api.prefix, but this breaks Bison 2.5 and earlier. +# Bison 3.0 and later require api.prefix in curly braces +# Bison 2.6 and later require api.prefix +# Bison 2.5 and earlier require name-prefix switch bisonvsn := $(word 4,$(shell $(BISON) --version)) bisonmaj := $(word 1,$(subst ., ,$(bisonvsn))) bisonmin := $(word 2,$(subst ., ,$(bisonvsn))) @@ -29,7 +31,7 @@ else BISON_DEFINES = --define=api.prefix=$(*F)_ endif else - BISON_DEFINES = --define=api.prefix=$(*F)_ + BISON_DEFINES = --define=api.prefix={$(*F)_} endif endif -- cgit v1.2.3