src/Pure/mk
author wenzelm
Mon Dec 09 16:05:41 1996 +0100 (1996-12-09)
changeset 2339 2d5551c8dec0
child 2340 74a01a9f325d
permissions -rwxr-xr-x
mk - build Pure Isabelle.
wenzelm@2339
     1
#!/bin/bash -norc
wenzelm@2339
     2
#
wenzelm@2339
     3
# $Id$
wenzelm@2339
     4
#
wenzelm@2339
     5
# mk - build Pure Isabelle.
wenzelm@2339
     6
#
wenzelm@2339
     7
# Notes:
wenzelm@2339
     8
#   (1) edit etc/settings approprately
wenzelm@2339
     9
#   (2) cd here and run ./mk
wenzelm@2339
    10
#
wenzelm@2339
    11
wenzelm@2339
    12
wenzelm@2339
    13
## diagnostics
wenzelm@2339
    14
wenzelm@2339
    15
function fail()
wenzelm@2339
    16
{
wenzelm@2339
    17
  echo "$1" >&2
wenzelm@2339
    18
  exit 2
wenzelm@2339
    19
}
wenzelm@2339
    20
wenzelm@2339
    21
wenzelm@2339
    22
## main
wenzelm@2339
    23
wenzelm@2339
    24
ML_SYSTEM=$(isatool getenv ML_SYSTEM)
wenzelm@2339
    25
ML_SYSTEM_BASE=$(echo $ML_SYSTEM | cut -f1 -d-)
wenzelm@2339
    26
[ -z "$ML_SYSTEM" ] && fail "Missing ML system settings! Unable to build Isabelle."
wenzelm@2339
    27
wenzelm@2339
    28
COMPAT=""
wenzelm@2339
    29
[ -f "ML-Systems/$ML_SYSTEM_BASE.ML" ] && COMPAT="ML-Systems/$ML_SYSTEM_BASE.ML"
wenzelm@2339
    30
[ -f "ML-Systems/$ML_SYSTEM.ML" ] && COMPAT="ML-Systems/$ML_SYSTEM.ML"
wenzelm@2339
    31
[ -z "$COMPAT" ] && fail "Missing compatibility file for ML system \"$ML_SYSTEM\"!"
wenzelm@2339
    32
wenzelm@2339
    33
exec isabelle -e "use\"$COMPAT\"; use\"ROOT.ML\" handle _ => exit 1;" -cq SYSTEM Pure