diff options
author | François Pottier <francois.pottier@inria.fr> | 2015-10-23 09:57:02 +0200 |
---|---|---|
committer | François Pottier <francois.pottier@inria.fr> | 2015-10-23 09:57:02 +0200 |
commit | 1ea7d1d09c350d0f0613f0bd763c3e01a70ddbb9 (patch) | |
tree | eb588e4a887365a4ea5e1c81adde23816d2993df /Makefile.menhir | |
parent | 581ac226fb42a0a005baa8941e5f39b181acc6cb (diff) | |
download | compcert-1ea7d1d09c350d0f0613f0bd763c3e01a70ddbb9.tar.gz compcert-1ea7d1d09c350d0f0613f0bd763c3e01a70ddbb9.zip |
Distinguish [MENHIR] and [MENHIR_MODE]. Cleaner, more flexible.
Diffstat (limited to 'Makefile.menhir')
-rw-r--r-- | Makefile.menhir | 14 |
1 files changed, 9 insertions, 5 deletions
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 \ |