diff libinterp/parse-tree/module.mk @ 18976:dcb260e7a648

maint: Periodic merge of gui-release to default.
author John W. Eaton <jwe@octave.org>
date Fri, 01 Aug 2014 12:10:05 -0400
parents c702371ff6df d8abf813c69f
children fe505ff21d5b
line wrap: on
line diff
--- a/libinterp/parse-tree/module.mk	Thu Jul 31 15:49:21 2014 +0200
+++ b/libinterp/parse-tree/module.mk	Fri Aug 01 12:10:05 2014 -0400
@@ -90,15 +90,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 += \