Commit 0344bb69 authored by POTTIER Francois's avatar POTTIER Francois

Fix the Makefile (again) to allow installation under opam/Windows.

parent 8de56171
2015/10/27:
Fix the Makefile in an attempt to allow installation under opam/Windows.
Thanks to Daniel Weil for his patient explanations.
2015/10/26:
Fix the Makefile in an attempt to allow installation under opam/Cygwin.
Allow --list-errors to work on 32-bit machines (with low hard limits).
This should fix a problem whereby the 2015/10/23 release could not
bootstrap on a 32-bit machine.
......
......@@ -59,12 +59,24 @@ else
# LIBSUFFIX := a
endif
# If Cygwin is present, then the path ${libdir} that is recorded in
# src/installation.ml (see below) must be translated using cygpath.
libdir := $(shell if which cygpath >/dev/null ; \
then echo "cygpath -m ${libdir}" ; \
else echo ${libdir} ; fi)
# The path ${libdir}, which is recorded in src/installation.ml (see below),
# must sometimes be translated using cygpath.
# This one is tricky. To summarize, if I understood correctly, we can assume
# that Cygwin always exists when Menhir is compiled and installed (because
# executing a Makefile, like this one, requires Cygwin), but we cannot assume
# that Menhir will be executed under Cygwin. If the OCaml compiler is
# configured to produce a Cygwin executable, then, yes, Cygwin is there at
# execution time, so path translation is not necessary (and should not be
# performed). On the other hand, if the OCaml compiler is configured to
# produce a native Windows executable, then Cygwin is not there at execution
# time and path translation is required. In summary, path translation must be
# performed if "os_type" is "Win32" or "Win64", and must not performed if
# "os_type" is "Cygwin" or "Unix".
ifneq (,$(findstring "os_type: Win", "$(shell ocamlc -config | grep os_type)"))
libdir := $(shell cygpath -m ${libdir})
endif
# -------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment