Skip to content

Commit

Permalink
Pausetimes available for all 5.X OCaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Firobe committed Nov 16, 2022
1 parent c5ffb4a commit 12fd3ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ ifeq (1, $(USE_SYS_DUNE_HACK))
ln -s $(SYS_DUNE_BASE_DIR)/lib/dune $(CURDIR)/_opam/sys_dune/lib/dune
opam install --switch=$(CONFIG_SWITCH_NAME) --yes ocamlfind
opam install --switch=$(CONFIG_SWITCH_NAME) --yes "dune.$(SANDMARK_DUNE_VERSION)" "dune-configurator.$(SANDMARK_DUNE_VERSION)"
# Pin the version so it doesn't change when installing packages
opam pin add --switch=$(CONFIG_SWITCH_NAME) --yes -n dune "$(SANDMARK_DUNE_VERSION)"
endif

Expand Down Expand Up @@ -153,10 +154,18 @@ _opam/%: _opam/opam-init/init.sh ocaml-versions/%.json
override_packages/%: setup_sys_dune/%
$(eval CONFIG_SWITCH_NAME = $*)
$(eval DEV_OPAM = $(OPAMROOT)/$(CONFIG_SWITCH_NAME)/share/dev.opam)
# Retrieve set of version constraints for chosen OCaml version
@{ case "$*" in \
*5.1.0*) echo "Using new template" && cp dependencies/template/dev-5.1.0+trunk.opam $(DEV_OPAM) ;; \
*) echo "Using old template" && cp dependencies/template/dev.opam $(DEV_OPAM) ;; \
esac };
# Conditionally install runtime_events_tools for olly (pausetimes)
@{ case "$*" in \
5.*) \
echo "Enabling pausetimes for OCaml >= 5" \
PACKAGES += runtime_events_tools ;; \
*) echo "Pausetimes unavailable for OCaml < 5" ;; \
esac };
opam repo add upstream "git+https://github.com/ocaml/opam-repository.git" --on-switch=$(CONFIG_SWITCH_NAME) --rank 2
opam repo add alpha git+https://github.com/kit-ty-kate/opam-alpha-repository.git --on-switch=$(CONFIG_SWITCH_NAME) --rank 2
opam exec --switch $(CONFIG_SWITCH_NAME) -- opam update
Expand Down
1 change: 0 additions & 1 deletion dependencies/template/dev-5.1.0+trunk.opam
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ depends: [
"stdlib-shims" {= "0.1.0"}
"uri" {= "4.1.0"}
"zarith" {= "1.10"}
"runtime_events_tools"
]

0 comments on commit 12fd3ff

Please sign in to comment.