diff libinterp/Makefile.am @ 19809:a941a65c7cb8

handle bison syntax changes in TeX parser * oct-tex-parser.in.yy: Rename from oct-tex-parser.yy. Substitute %API_PREFIX_DECL%. * build-aux/common.mk (subst-bison-api-decls): New macro. * libinterp/parse-tree/module.mk (oct-parse.yy): Use it. * libinterp/corefcn/module.mk (oct-tex-parser.yy): New rule. * libinterp/Makefile.am: Ensure that oct-tex-parser.yy is built early. Search for tests in generated .yy file, not .in.yy file. * oct-tex-lexer.in.ll: Define YYSTPE if needed.
author John W. Eaton <jwe@octave.org>
date Thu, 19 Feb 2015 18:05:07 -0500
parents 4197fc428c7d
children 4f6ae6b94abe
line wrap: on
line diff
--- a/libinterp/Makefile.am	Thu Feb 19 17:33:59 2015 -0500
+++ b/libinterp/Makefile.am	Thu Feb 19 18:05:07 2015 -0500
@@ -63,13 +63,22 @@
   builtin-defun-decls.h \
   builtins.cc
 
+ULT_PARSER_SRC := \
+  corefcn/oct-tex-lexer.in.ll \
+  corefcn/oct-tex-parser.in.yy \
+  parse-tree/oct-parse.in.yy
+
+GENERATED_PARSER_FILES := \
+  corefcn/oct-tex-lexer.ll \
+  corefcn/oct-tex-parser.yy \
+  parse-tree/oct-parse.yy
+
 BUILT_DISTFILES = \
-  corefcn/oct-tex-lexer.ll \
+  $(GENERATED_PARSER_FILES) \
   corefcn/oct-tex-parser.h \
   corefcn/oct-tex-symbols.cc \
   parse-tree/oct-gperf.h \
-  parse-tree/oct-parse.h \
-  parse-tree/oct-parse.yy
+  parse-tree/oct-parse.h
 
 ## Files that are created during build process and installed,
 ## BUT not distributed in tarball.
@@ -203,7 +212,7 @@
 ## Section for defining and creating DEF_FILES
 
 ULT_DIST_SRC := \
-  $(filter-out corefcn/oct-tex-lexer.ll parse-tree/oct-parse.yy, $(DIST_SRC)) corefcn/oct-tex-lexer.in.ll parse-tree/oct-parse.in.yy
+  $(filter-out $(GENERATED_PARSER_FILES), $(DIST_SRC)) $(ULT_PARSER_SRC)
 
 SRC_DEF_FILES := $(shell $(srcdir)/find-defun-files.sh "$(srcdir)" $(ULT_DIST_SRC))