diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-10-27 10:50:18 +0100 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-10-27 10:50:18 +0100 |
commit | ef770408caabffed0844a72e45e1346f327ee016 (patch) | |
tree | 855652bbce707952dca8427477660f0a52c41254 | |
parent | ff7aa1352d4171724963bb834e09a6abdf0e630e (diff) | |
download | compcert-ef770408caabffed0844a72e45e1346f327ee016.tar.gz compcert-ef770408caabffed0844a72e45e1346f327ee016.zip |
Test if menhir includes is set before trying to set it.
Bug 17481.
-rw-r--r-- | Makefile.menhir | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.menhir b/Makefile.menhir index e845352d..bbfc2495 100644 --- a/Makefile.menhir +++ b/Makefile.menhir @@ -64,11 +64,13 @@ endif # can instead ask ocamlfind where Menhir's library was installed. Otherwise, # Menhir answers directly with a "-I ..." directive, which we use. +ifndef $(MENHIR_INCLUDES) + ifeq ($(MENHIR_TABLE),true) MENHIR_SUGGESTION = $(MENHIR) $(MENHIR_MODE) --suggest-comp-flags - MENHIR_INCLUDES ?= $(shell \ + MENHIR_INCLUDES := $(shell \ if $(MENHIR_SUGGESTION) | grep -e "-package" >/dev/null ; then \ echo "-I `ocamlfind query menhirLib`" ; \ else \ @@ -80,3 +82,5 @@ else MENHIR_INCLUDES = endif + +endif |