dedicated environment setting for ocaml environment: ISABELLE_OPAM_ROOT is always present even if no envionrment is available
authorhaftmann
Thu Mar 14 13:54:31 2019 +0000 (11 days ago)
changeset 699100c0f7b4a72bf
parent 69909 5382f5691a11
child 69911 036037573080
dedicated environment setting for ocaml environment: ISABELLE_OPAM_ROOT is always present even if no envionrment is available
lib/scripts/getsettings
src/Tools/Code/code_ml.ML
     1.1 --- a/lib/scripts/getsettings	Thu Mar 14 09:46:09 2019 +0100
     1.2 +++ b/lib/scripts/getsettings	Thu Mar 14 13:54:31 2019 +0000
     1.3 @@ -109,6 +109,11 @@
     1.4    ISABELLE_OCAMLC="$ISABELLE_HOME/lib/scripts/ocamlc"
     1.5  fi
     1.6  
     1.7 +#enforce ISABELLE_OCAMLEXEC
     1.8 +if [ -d "$ISABELLE_OPAM_ROOT/$ISABELLE_OCAML_VERSION/bin" ]; then
     1.9 +  ISABELLE_OCAMLEXEC="$ISABELLE_HOME/lib/scripts/ocamlexec"
    1.10 +fi
    1.11 +
    1.12  #enforce ISABELLE_GHC
    1.13  if [ -d "$ISABELLE_STACK_ROOT" -a -f "$ISABELLE_STACK_ROOT/ISABELLE_GHC_PROGRAMS" ]; then
    1.14    if [ -f "$(cat "$ISABELLE_STACK_ROOT/ISABELLE_GHC_PROGRAMS")/$ISABELLE_GHC_VERSION/bin/ghc" ]; then
     2.1 --- a/src/Tools/Code/code_ml.ML	Thu Mar 14 09:46:09 2019 +0100
     2.2 +++ b/src/Tools/Code/code_ml.ML	Thu Mar 14 13:54:31 2019 +0000
     2.3 @@ -885,11 +885,11 @@
     2.4        evaluation_args = []})
     2.5    #> Code_Target.add_language
     2.6      (target_OCaml, {serializer = serializer_ocaml, literals = literals_ocaml,
     2.7 -      check = {env_var = "ISABELLE_OPAM_ROOT",
     2.8 +      check = {env_var = "ISABELLE_OCAMLEXEC",
     2.9          make_destination = fn p => Path.append p (Path.explode "ROOT.ml")
    2.10            (*extension demanded by OCaml compiler*),
    2.11          make_command = fn _ =>
    2.12 -          "\"$ISABELLE_ROOT/lib/scripts/ocamlexec\" ocamlfind ocamlopt -w pu -package zarith -linkpkg ROOT.ml"},
    2.13 +          "\"$ISABELLE_OCAMLEXEC\" ocamlfind ocamlopt -w pu -package zarith -linkpkg ROOT.ml"},
    2.14        evaluation_args = []})
    2.15    #> Code_Target.set_printings (Type_Constructor ("fun",
    2.16      [(target_SML, SOME (2, fun_syntax)), (target_OCaml, SOME (2, fun_syntax))]))