From ef770408caabffed0844a72e45e1346f327ee016 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 27 Oct 2015 10:50:18 +0100 Subject: Test if menhir includes is set before trying to set it. Bug 17481. --- Makefile.menhir | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile.menhir') 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 -- cgit