lib/scripts/ocamlc
author wenzelm
Thu, 08 Nov 2018 16:18:12 +0100
changeset 69268 c1a27fce2076
parent 69261 lib/Tools/ocamlc@a41f49148525
child 69924 512ac874bb9d
permissions -rwxr-xr-x
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;
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 ocamlc 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" -- ocamlc "$@"
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 ocamlc: 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