more uniform (see 1722cc56d22e);
authorwenzelm
Thu Nov 08 12:32:06 2018 +0100 (6 months ago)
changeset 69261a41f49148525
parent 69260 0a9688695a1b
child 69262 f94726501b37
more uniform (see 1722cc56d22e);
lib/Tools/ocaml
lib/Tools/ocamlc
     1.1 --- a/lib/Tools/ocaml	Thu Nov 08 09:11:52 2018 +0100
     1.2 +++ b/lib/Tools/ocaml	Thu Nov 08 12:32:06 2018 +0100
     1.3 @@ -4,4 +4,10 @@
     1.4  #
     1.5  # DESCRIPTION: invoke OCaml within the Isabelle environment
     1.6  
     1.7 -isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocaml "$@"
     1.8 +if [ -d "$ISABELLE_OPAM_ROOT" -a -n "$ISABELLE_OCAML" ]
     1.9 +then
    1.10 +  isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocaml "$@"
    1.11 +else
    1.12 +  echo "Cannot execute ocaml: missing Isabelle OCaml setup" >&2
    1.13 +  exit 127
    1.14 +fi
     2.1 --- a/lib/Tools/ocamlc	Thu Nov 08 09:11:52 2018 +0100
     2.2 +++ b/lib/Tools/ocamlc	Thu Nov 08 12:32:06 2018 +0100
     2.3 @@ -4,4 +4,10 @@
     2.4  #
     2.5  # DESCRIPTION: invoke OCaml compiler within the Isabelle environment
     2.6  
     2.7 -isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocamlc "$@"
     2.8 +if [ -d "$ISABELLE_OPAM_ROOT" -a -n "$ISABELLE_OCAMLC" ]
     2.9 +then
    2.10 +  isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocamlc "$@"
    2.11 +else
    2.12 +  echo "Cannot execute ocamlc: missing Isabelle OCaml setup" >&2
    2.13 +  exit 127
    2.14 +fi