aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.menhir
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-10-18 11:10:32 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2016-10-18 11:10:32 +0200
commitab6a906f09514d1ed81fb0970fb7151021407062 (patch)
tree627bef91884922ca0eb040ad9101b9026e2b89be /Makefile.menhir
parent22efd958aef1d4372a905158befa5394dec3c604 (diff)
downloadcompcert-kvx-ab6a906f09514d1ed81fb0970fb7151021407062.tar.gz
compcert-kvx-ab6a906f09514d1ed81fb0970fb7151021407062.zip
Query menhir for location of menhir lib in config.
Since the menhir version required supports the --suggest-menhirLib flag we can query it already in the configure script simplifying the Makefile.menhir
Diffstat (limited to 'Makefile.menhir')
-rw-r--r--Makefile.menhir37
1 files changed, 0 insertions, 37 deletions
diff --git a/Makefile.menhir b/Makefile.menhir
index b72c52f3..1530536f 100644
--- a/Makefile.menhir
+++ b/Makefile.menhir
@@ -47,40 +47,3 @@ endif
%.ml %.mli: %.mly
$(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,
-# CompCert can be compiled and linked even in the absence of ocamlfind.
-# So, we should not require ocamlfind.
-
-# Note 2: Menhir has options --suggest-comp-flags and --suggest-link-flags
-# which we are supposed to help solve this difficulty. However, they don't
-# work for us out of the box, because if Menhir has been installed using
-# ocamlfind, then Menhir will suggest using ocamlfind (i.e. it will suggest
-# -package and -linkpkg options), which we don't want to do.
-
-# Solution: Ask Menhir first. If Menhir answers "-package menhirLib", then
-# Menhir was installed with ocamlfind, so we should not ask Menhir, but we
-# 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 \
- if $(MENHIR_SUGGESTION) | grep -e "-package" >/dev/null ; then \
- echo "-I `ocamlfind query menhirLib`" ; \
- else \
- $(MENHIR_SUGGESTION) ; \
- fi)
-
-else
-
- MENHIR_INCLUDES =
-
-endif
-
-endif