# HG changeset patch # User wenzelm # Date 1541676726 -3600 # Node ID a41f491485257e296892fd438e13599dd5164365 # Parent 0a9688695a1b83b53a98b6e60445f66923d0c4cd more uniform (see 1722cc56d22e); diff -r 0a9688695a1b -r a41f49148525 lib/Tools/ocaml --- a/lib/Tools/ocaml Thu Nov 08 09:11:52 2018 +0100 +++ b/lib/Tools/ocaml Thu Nov 08 12:32:06 2018 +0100 @@ -4,4 +4,10 @@ # # DESCRIPTION: invoke OCaml within the Isabelle environment -isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocaml "$@" +if [ -d "$ISABELLE_OPAM_ROOT" -a -n "$ISABELLE_OCAML" ] +then + isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocaml "$@" +else + echo "Cannot execute ocaml: missing Isabelle OCaml setup" >&2 + exit 127 +fi diff -r 0a9688695a1b -r a41f49148525 lib/Tools/ocamlc --- a/lib/Tools/ocamlc Thu Nov 08 09:11:52 2018 +0100 +++ b/lib/Tools/ocamlc Thu Nov 08 12:32:06 2018 +0100 @@ -4,4 +4,10 @@ # # DESCRIPTION: invoke OCaml compiler within the Isabelle environment -isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocamlc "$@" +if [ -d "$ISABELLE_OPAM_ROOT" -a -n "$ISABELLE_OCAMLC" ] +then + isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocamlc "$@" +else + echo "Cannot execute ocamlc: missing Isabelle OCaml setup" >&2 + exit 127 +fi