lib/scripts/ocamlfind
author wenzelm
Wed, 20 Mar 2019 20:15:30 +0100
changeset 70108 110fff287217
parent 70106 lib/scripts/ocamlexec@512ac874bb9d
child 70130 a591de179931
permissions -rwxr-xr-x
access OCaml tools and libraries via ISABELLE_OCAMLFIND; OPAM setup is optional: it requires odd development tools that are not available in default OS installations (e.g. make, m4);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
70087
55534affe445 migrated from Nums to Zarith as library for OCaml integer arithmetic
haftmann
parents:
diff changeset
     1
#!/usr/bin/env bash
55534affe445 migrated from Nums to Zarith as library for OCaml integer arithmetic
haftmann
parents:
diff changeset
     2
#
55534affe445 migrated from Nums to Zarith as library for OCaml integer arithmetic
haftmann
parents:
diff changeset
     3
# Author: Makarius; Florian Haftmann
55534affe445 migrated from Nums to Zarith as library for OCaml integer arithmetic
haftmann
parents:
diff changeset
     4
#
70108
110fff287217 access OCaml tools and libraries via ISABELLE_OCAMLFIND;
wenzelm
parents: 70106
diff changeset
     5
# Invoke ocamlfind via "opam".
70087
55534affe445 migrated from Nums to Zarith as library for OCaml integer arithmetic
haftmann
parents:
diff changeset
     6
70106
512ac874bb9d more robust: allow empty root (e.g. via symlink);
wenzelm
parents: 70087
diff changeset
     7
if [ -e "$ISABELLE_OPAM_ROOT/config" ]
70087
55534affe445 migrated from Nums to Zarith as library for OCaml integer arithmetic
haftmann
parents:
diff changeset
     8
then
70108
110fff287217 access OCaml tools and libraries via ISABELLE_OCAMLFIND;
wenzelm
parents: 70106
diff changeset
     9
  isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocamlfind "$@"
70087
55534affe445 migrated from Nums to Zarith as library for OCaml integer arithmetic
haftmann
parents:
diff changeset
    10
else
70108
110fff287217 access OCaml tools and libraries via ISABELLE_OCAMLFIND;
wenzelm
parents: 70106
diff changeset
    11
  echo "Cannot execute ocamlfind: missing Isabelle OCaml setup" >&2
70087
55534affe445 migrated from Nums to Zarith as library for OCaml integer arithmetic
haftmann
parents:
diff changeset
    12
  exit 127
55534affe445 migrated from Nums to Zarith as library for OCaml integer arithmetic
haftmann
parents:
diff changeset
    13
fi