1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/Pure/mk Mon Dec 09 16:05:41 1996 +0100
1.3 @@ -0,0 +1,33 @@
1.4 +#!/bin/bash -norc
1.5 +#
1.6 +# $Id$
1.7 +#
1.8 +# mk - build Pure Isabelle.
1.9 +#
1.10 +# Notes:
1.11 +# (1) edit etc/settings approprately
1.12 +# (2) cd here and run ./mk
1.13 +#
1.14 +
1.15 +
1.16 +## diagnostics
1.17 +
1.18 +function fail()
1.19 +{
1.20 + echo "$1" >&2
1.21 + exit 2
1.22 +}
1.23 +
1.24 +
1.25 +## main
1.26 +
1.27 +ML_SYSTEM=$(isatool getenv ML_SYSTEM)
1.28 +ML_SYSTEM_BASE=$(echo $ML_SYSTEM | cut -f1 -d-)
1.29 +[ -z "$ML_SYSTEM" ] && fail "Missing ML system settings! Unable to build Isabelle."
1.30 +
1.31 +COMPAT=""
1.32 +[ -f "ML-Systems/$ML_SYSTEM_BASE.ML" ] && COMPAT="ML-Systems/$ML_SYSTEM_BASE.ML"
1.33 +[ -f "ML-Systems/$ML_SYSTEM.ML" ] && COMPAT="ML-Systems/$ML_SYSTEM.ML"
1.34 +[ -z "$COMPAT" ] && fail "Missing compatibility file for ML system \"$ML_SYSTEM\"!"
1.35 +
1.36 +exec isabelle -e "use\"$COMPAT\"; use\"ROOT.ML\" handle _ => exit 1;" -cq SYSTEM Pure