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 dune build @install --promote-install-files
install: prepare-install install: prepare-install
if [ x$$($(OPAM) --version) = "x2.1.5" ]; then \ case x$$($(OPAM) --version) in \
$(OPAM) install . --working-dir; \ x2.1.5|x2.1.6) $(OPAM) install . --working-dir;; \
else \ *) $(OPAM) install . --working-dir --assume-built;; \
$(OPAM) install . --working-dir --assume-built; \ esac
fi
# `dune install` would work, but does a dirty install to the opam prefix without # `dune install` would work, but does a dirty install to the opam prefix without
# registering with opam. # 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 inst: prepare-install
@opam custom-install \ @opam custom-install \