Commit 02efad8b authored by Daiki Ueno's avatar Daiki Ueno
Browse files

gnulib: parse-datetime: port compilation error fix with bison 3.7


Signed-off-by: Daiki Ueno's avatarDaiki Ueno <ueno@gnu.org>
parent 5e79a353
From b4953c24746af418aa005c4f64c80623af1c68ad Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Wed, 29 Jul 2020 18:18:18 +0200
Subject: [PATCH] parse-datetime: Fix compilation error with bison 3.7.
* modules/parse-datetime (Makefile.am): Create a generated header file
parse-datetime-gen.h in the source directory. Correct #include and
---
ChangeLog | 7 +++++++
modules/parse-datetime | 18 ++++++++++++------
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/modules/parse-datetime b/modules/parse-datetime
index b4375fda4..39aaf6c59 100644
--- a/modules/parse-datetime
+++ b/modules/parse-datetime
@@ -45,15 +45,21 @@ Makefile.am:
parse-datetime.c: parse-datetime.y
$(AM_V_YACC)$(PARSE_DATETIME_BISON) -d $(YFLAGS) $(AM_YFLAGS) $(srcdir)/parse-datetime.y \
&& test ':' = '$(PARSE_DATETIME_BISON)' || { \
- sed -e 's|".*/parse-datetime.y"|"parse-datetime.y"|' < parse-datetime.tab.c > parse-datetime.c-t \
+ sed -e 's|".*/parse-datetime\.y"|"parse-datetime.y"|' \
+ -e 's|"parse-datetime\.tab\.c"|"parse-datetime.c"|' \
+ -e 's|"parse-datetime\.tab\.h"|"parse-datetime-gen.h"|' \
+ < parse-datetime.tab.c > parse-datetime.c-tmp \
+ && sed -e 's|"parse-datetime\.tab\.h"|"parse-datetime-gen.h"|' \
+ < parse-datetime.tab.h > parse-datetime-gen.h-tmp \
&& rm -f parse-datetime.tab.c parse-datetime.tab.h \
- && mv parse-datetime.c-t $(srcdir)/parse-datetime.c; \
+ && mv parse-datetime.c-tmp $(srcdir)/parse-datetime.c \
+ && mv parse-datetime-gen.h-tmp $(srcdir)/parse-datetime-gen.h; \
}
lib_SOURCES += parse-datetime.y
-BUILT_SOURCES += parse-datetime.c
-MOSTLYCLEANFILES += parse-datetime.tab.c parse-datetime.tab.h parse-datetime.c-t
-MAINTAINERCLEANFILES += parse-datetime.c
-EXTRA_DIST += parse-datetime.c
+BUILT_SOURCES += parse-datetime.c parse-datetime-gen.h
+MOSTLYCLEANFILES += parse-datetime.tab.c parse-datetime.tab.h parse-datetime.c-tmp parse-datetime-gen.h-tmp
+MAINTAINERCLEANFILES += parse-datetime.c parse-datetime-gen.h
+EXTRA_DIST += parse-datetime.c parse-datetime-gen.h
Include:
"parse-datetime.h"
--
2.30.2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment