Mercurial > octave-dspies
diff libinterp/parse-tree/module.mk @ 18974:d8abf813c69f stable
handle changes in bison 3.x
* acinclude.m4 (OCTAVE_PROG_BISON): Also check for the proper way to
declare api.prefix.
* build-aux/common.mk (BISON_API_PREFIX_DECL_STYLE): New variable.
* lex.ll: Conditionally define YYSTYPE.
* oct-parse.in.yy (%API_PREFIX_DECL%): Allow for differences in the
way api.prefix is specified in different versions of bison.
* libinterp/parse-tree/module.mk (parse-tree/oct-parse.yy): Also
substitute %API_PREFIX_DECL% in lex.ll.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 01 Aug 2014 08:09:02 -0400 |
parents | 813523c2b581 |
children | dcb260e7a648 7761c281aac0 |
line wrap: on
line diff
--- a/libinterp/parse-tree/module.mk Tue Jul 01 15:56:00 2014 -0400 +++ b/libinterp/parse-tree/module.mk Fri Aug 01 08:09:02 2014 -0400 @@ -86,15 +86,20 @@ rm -f $@-t1 parse-tree/oct-parse.yy: parse-tree/oct-parse.in.yy + case "$(BISON_API_PREFIX_DECL_STYLE)" in \ + *api*) api_prefix_decl='%define api.prefix "octave-"'; ;; \ + *name*) api_prefix_decl='%name-prefix="octave_"'; ;; \ + esac; \ case "$(BISON_PUSH_PULL_DECL_STYLE)" in \ - *quote*) quote='"' ;; \ + *quote*) quote='"' ;; \ *) quote="" ;; \ - esac; \ - case "$(BISON_PUSH_PULL_DECL_STYLE)" in \ - *dash*) decl="%define api.push-pull $${quote}both$${quote}"; ;; \ - *underscore*) decl="%define api.push_pull $${quote}both$${quote}"; ;; \ - esac; \ - $(SED) "s/%PUSH_PULL_DECL%/$$decl/" $< > $@-t + esac; \ + case "$(BISON_PUSH_PULL_DECL_STYLE)" in \ + *dash*) push_pull_decl="%define api.push-pull $${quote}both$${quote}"; ;; \ + *underscore*) push_pull_decl="%define api.push_pull $${quote}both$${quote}"; ;; \ + esac; \ + $(SED) -e "s/%PUSH_PULL_DECL%/$$push_pull_decl/" \ + -e "s/%API_PREFIX_DECL%/$$api_prefix_decl/" $< > $@-t mv $@-t $@ noinst_LTLIBRARIES += \