Fix for opam 2.1.6

The fix for the annoying bug with --assume-built has not been backported from
the 2.2 branch.
This commit is contained in:
Louis Gesbert 2024-06-26 17:50:04 +02:00
parent 291a8e05e4
commit 52f1f14a08

View File

@ -99,14 +99,13 @@ prepare-install:
dune build @install --promote-install-files
install: prepare-install
if [ x$$($(OPAM) --version) = "x2.1.5" ]; then \
$(OPAM) install . --working-dir; \
else \
$(OPAM) install . --working-dir --assume-built; \
fi
case x$$($(OPAM) --version) in \
x2.1.5|x2.1.6) $(OPAM) install . --working-dir;; \
*) $(OPAM) install . --working-dir --assume-built;; \
esac
# `dune install` would work, but does a dirty install to the opam prefix without
# registering with opam.
# --assume-built is broken in 2.1.5
# --assume-built is broken in 2.1.5 and 2.1.6
inst: prepare-install
@opam custom-install \