lib/scripts/ocaml
author wenzelm
Sat, 10 Nov 2018 19:01:20 +0100
changeset 69281 599b6d0d199b
parent 69268 c1a27fce2076
permissions -rwxr-xr-x
tuned signature;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
69135
be20f5f6feb9 support for OCaml via command-line tools;
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env bash
be20f5f6feb9 support for OCaml via command-line tools;
wenzelm
parents:
diff changeset
     2
#
be20f5f6feb9 support for OCaml via command-line tools;
wenzelm
parents:
diff changeset
     3
# Author: Makarius
be20f5f6feb9 support for OCaml via command-line tools;
wenzelm
parents:
diff changeset
     4
#
69268
c1a27fce2076 clarified tool setup for GHC / OCaml: discontinued "isabelle ghc", "isabelle ocaml", "isabelle ocamlc" to avoid confusion with traditional settings variables for executables (these are still required in existing applications, notably in session options [condition = ISABELLE_GHC] etc. and codegen setup;
wenzelm
parents: 69261
diff changeset
     5
# Invoke ocaml via "opam".
69135
be20f5f6feb9 support for OCaml via command-line tools;
wenzelm
parents:
diff changeset
     6
69268
c1a27fce2076 clarified tool setup for GHC / OCaml: discontinued "isabelle ghc", "isabelle ocaml", "isabelle ocamlc" to avoid confusion with traditional settings variables for executables (these are still required in existing applications, notably in session options [condition = ISABELLE_GHC] etc. and codegen setup;
wenzelm
parents: 69261
diff changeset
     7
if [ -d "$ISABELLE_OPAM_ROOT" ]
69261
a41f49148525 more uniform (see 1722cc56d22e);
wenzelm
parents: 69135
diff changeset
     8
then
a41f49148525 more uniform (see 1722cc56d22e);
wenzelm
parents: 69135
diff changeset
     9
  isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocaml "$@"
a41f49148525 more uniform (see 1722cc56d22e);
wenzelm
parents: 69135
diff changeset
    10
else
a41f49148525 more uniform (see 1722cc56d22e);
wenzelm
parents: 69135
diff changeset
    11
  echo "Cannot execute ocaml: missing Isabelle OCaml setup" >&2
a41f49148525 more uniform (see 1722cc56d22e);
wenzelm
parents: 69135
diff changeset
    12
  exit 127
a41f49148525 more uniform (see 1722cc56d22e);
wenzelm
parents: 69135
diff changeset
    13
fi