From 1ea7d1d09c350d0f0613f0bd763c3e01a70ddbb9 Mon Sep 17 00:00:00 2001 From: François Pottier Date: Fri, 23 Oct 2015 09:57:02 +0200 Subject: Distinguish [MENHIR] and [MENHIR_MODE]. Cleaner, more flexible. --- Makefile.menhir | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'Makefile.menhir') diff --git a/Makefile.menhir b/Makefile.menhir index 72b54b14..db28ffaa 100644 --- a/Makefile.menhir +++ b/Makefile.menhir @@ -1,5 +1,9 @@ # This is a Makefile fragment for Menhir-specific aspects. +# Executable. + +MENHIR = menhir + # This flag can be set to true or false. It controls whether we use # Menhir's table back-end or code back-end. The table back-end is a # bit slower, but supports more features, including advanced error @@ -7,12 +11,12 @@ MENHIR_TABLE = false -# Executable. +# To pass or not to pass --table. ifeq ($(MENHIR_TABLE),true) - MENHIR = menhir --table + MENHIR_MODE = --table else - MENHIR = menhir + MENHIR_MODE = endif # Options. @@ -30,7 +34,7 @@ endif # The compilation rule. %.ml %.mli: %.mly - $(MENHIR) $(MENHIR_FLAGS) $< + $(MENHIR) $(MENHIR_MODE) $(MENHIR_FLAGS) $< # Note 1: finding where MenhirLib has been installed would be easier if we # could depend on ocamlfind, but as far as I understand and as of today, @@ -50,7 +54,7 @@ endif ifeq ($(MENHIR_TABLE),true) - MENHIR_SUGGESTION = $(MENHIR) --suggest-comp-flags + MENHIR_SUGGESTION = $(MENHIR) $(MENHIR_MODE) --suggest-comp-flags MENHIR_INCLUDES := $(shell \ if $(MENHIR_SUGGESTION) | grep -e "-package" >/dev/null ; then \ -- cgit