Add [make versions].

This commit is contained in:
François Pottier 2021-12-22 13:55:18 +01:00
parent 0cb6d6eaff
commit e7cc6adfba
2 changed files with 35 additions and 0 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
inferno.install inferno.install
.merlin .merlin
_build _build
dune-workspace.versions

View File

@ -52,6 +52,40 @@ pin:
unpin: unpin:
@ opam pin remove $(THIS) @ opam pin remove $(THIS)
# [make versions] compiles Inferno under many versions of OCaml, whose
# list is specified below.
# This requires appropriate opam switches to exist. A missing switch
# can be created like this:
# opam switch create 4.03.0
VERSIONS := \
4.08.1 \
4.09.1 \
4.09.0+bytecode-only \
4.10.0 \
4.11.1 \
4.12.0 \
4.13.0 \
.PHONY: versions
versions:
@(echo "(lang dune 2.0)" && \
for v in $(VERSIONS) ; do \
echo "(context (opam (switch $$v)))" ; \
done) > dune-workspace.versions
@ dune build --workspace dune-workspace.versions @all
.PHONY: handiwork
handiwork:
@ current=`opam switch show` ; \
for v in $(VERSIONS) ; do \
opam switch $$v && \
eval $$(opam env) && \
opam install --yes qcheck-alcotest ; \
done ; \
opam switch $$current
HEADACHE := headache HEADACHE := headache
LIBHEAD := $(shell pwd)/headers/library-header LIBHEAD := $(shell pwd)/headers/library-header
FIND := $(shell if command -v gfind >/dev/null ; then echo gfind ; else echo find ; fi) FIND := $(shell if command -v gfind >/dev/null ; then echo gfind ; else echo find ; fi)