# HG changeset patch # User haftmann # Date 1552571671 0 # Node ID 0c0f7b4a72bf6bd60b25bf7581657afd4ddae39f # Parent 5382f5691a11f66a0cc755c766c983fb1a059ec1 dedicated environment setting for ocaml environment: ISABELLE_OPAM_ROOT is always present even if no envionrment is available diff -r 5382f5691a11 -r 0c0f7b4a72bf lib/scripts/getsettings --- a/lib/scripts/getsettings Thu Mar 14 09:46:09 2019 +0100 +++ b/lib/scripts/getsettings Thu Mar 14 13:54:31 2019 +0000 @@ -109,6 +109,11 @@ ISABELLE_OCAMLC="$ISABELLE_HOME/lib/scripts/ocamlc" fi +#enforce ISABELLE_OCAMLEXEC +if [ -d "$ISABELLE_OPAM_ROOT/$ISABELLE_OCAML_VERSION/bin" ]; then + ISABELLE_OCAMLEXEC="$ISABELLE_HOME/lib/scripts/ocamlexec" +fi + #enforce ISABELLE_GHC if [ -d "$ISABELLE_STACK_ROOT" -a -f "$ISABELLE_STACK_ROOT/ISABELLE_GHC_PROGRAMS" ]; then if [ -f "$(cat "$ISABELLE_STACK_ROOT/ISABELLE_GHC_PROGRAMS")/$ISABELLE_GHC_VERSION/bin/ghc" ]; then diff -r 5382f5691a11 -r 0c0f7b4a72bf src/Tools/Code/code_ml.ML --- a/src/Tools/Code/code_ml.ML Thu Mar 14 09:46:09 2019 +0100 +++ b/src/Tools/Code/code_ml.ML Thu Mar 14 13:54:31 2019 +0000 @@ -885,11 +885,11 @@ evaluation_args = []}) #> Code_Target.add_language (target_OCaml, {serializer = serializer_ocaml, literals = literals_ocaml, - check = {env_var = "ISABELLE_OPAM_ROOT", + check = {env_var = "ISABELLE_OCAMLEXEC", make_destination = fn p => Path.append p (Path.explode "ROOT.ml") (*extension demanded by OCaml compiler*), make_command = fn _ => - "\"$ISABELLE_ROOT/lib/scripts/ocamlexec\" ocamlfind ocamlopt -w pu -package zarith -linkpkg ROOT.ml"}, + "\"$ISABELLE_OCAMLEXEC\" ocamlfind ocamlopt -w pu -package zarith -linkpkg ROOT.ml"}, evaluation_args = []}) #> Code_Target.set_printings (Type_Constructor ("fun", [(target_SML, SOME (2, fun_syntax)), (target_OCaml, SOME (2, fun_syntax))]))