# HG changeset patch # User wenzelm # Date 1736950419 -3600 # Node ID c551d4a418b9bfe5e0e40904ea3590e99ba83b06 # Parent ef849800cc97aa4c2281bd9c9a2a9e18ac0e2786 provide less ambitious "isabelle ocaml_setup_base", notably for platforms without gmp-dev; diff -r ef849800cc97 -r c551d4a418b9 lib/Tools/ocaml_setup --- a/lib/Tools/ocaml_setup Wed Jan 15 13:45:22 2025 +0100 +++ b/lib/Tools/ocaml_setup Wed Jan 15 15:13:39 2025 +0100 @@ -2,20 +2,6 @@ # # Author: Makarius # -# DESCRIPTION: setup OCaml via OPAM - -set -e +# DESCRIPTION: setup OCaml for Isabelle via OPAM -if [ -d "$ISABELLE_OPAM_ROOT/$ISABELLE_OCAML_VERSION/bin" ] -then - isabelle_opam switch -y "$ISABELLE_OCAML_VERSION" -elif [ -e "$ISABELLE_OPAM_ROOT/config" ] -then - isabelle_opam switch create -y "$ISABELLE_OCAML_VERSION" -else - mkdir -p "$ISABELLE_OPAM_ROOT" - cd "$ISABELLE_OPAM_ROOT" - isabelle_opam init -y --disable-sandboxing --no-setup --compiler="$ISABELLE_OCAML_VERSION" -fi - -isabelle_opam install -y zarith +isabelle ocaml_setup_base && isabelle_opam install -y zarith diff -r ef849800cc97 -r c551d4a418b9 lib/Tools/ocaml_setup_base --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/Tools/ocaml_setup_base Wed Jan 15 15:13:39 2025 +0100 @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# +# Author: Makarius +# +# DESCRIPTION: setup OCaml base compiler via OPAM + +set -e + +if [ -d "$ISABELLE_OPAM_ROOT/$ISABELLE_OCAML_VERSION/bin" ] +then + isabelle_opam switch -y "$ISABELLE_OCAML_VERSION" +elif [ -e "$ISABELLE_OPAM_ROOT/config" ] +then + isabelle_opam switch create -y "$ISABELLE_OCAML_VERSION" +else + mkdir -p "$ISABELLE_OPAM_ROOT" + cd "$ISABELLE_OPAM_ROOT" + isabelle_opam init -y --disable-sandboxing --no-setup --compiler="$ISABELLE_OCAML_VERSION" +fi