src/Pure/mk
author wenzelm
Mon, 16 Dec 1996 10:00:08 +0100
changeset 2401 0293bc1cecfc
parent 2340 74a01a9f325d
child 2432 527b5f1b7520
permissions -rwxr-xr-x
now passes ML_SYSTEM as ml_system;
     1 #!/bin/bash -norc
     2 #
     3 # $Id$
     4 #
     5 # mk - build Pure Isabelle.
     6 #
     7 # Notes:
     8 #   (1) make sure the Isabelle bin dir is in PATH (try 'which isabelle')
     9 #   (2) make sure etc/settings are appropriate
    10 #   (3) then cd here and run ./mk
    11 
    12 
    13 ## diagnostics
    14 
    15 function fail()
    16 {
    17   echo "$1" >&2
    18   exit 2
    19 }
    20 
    21 
    22 ## main
    23 
    24 ML_SYSTEM=$(isatool getenv ML_SYSTEM)
    25 ML_SYSTEM_BASE=$(echo $ML_SYSTEM | cut -f1 -d-)
    26 [ -z "$ML_SYSTEM" ] && fail "Missing ML system settings! Unable to build Isabelle."
    27 
    28 COMPAT=""
    29 [ -f "ML-Systems/$ML_SYSTEM_BASE.ML" ] && COMPAT="ML-Systems/$ML_SYSTEM_BASE.ML"
    30 [ -f "ML-Systems/$ML_SYSTEM.ML" ] && COMPAT="ML-Systems/$ML_SYSTEM.ML"
    31 [ -z "$COMPAT" ] && fail "Missing compatibility file for ML system \"$ML_SYSTEM\"!"
    32 
    33 exec isabelle \
    34   -e "val ml_system = \"$ML_SYSTEM\";" \
    35   -e "use\"$COMPAT\"; use\"ROOT.ML\" handle _ => exit 1;" \
    36   -cq SYSTEM Pure