2339
|
1 |
#!/bin/bash -norc
|
|
2 |
#
|
|
3 |
# $Id$
|
|
4 |
#
|
|
5 |
# mk - build Pure Isabelle.
|
|
6 |
#
|
|
7 |
# Notes:
|
|
8 |
# (1) edit etc/settings approprately
|
|
9 |
# (2) cd here and run ./mk
|
|
10 |
#
|
|
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 -e "use\"$COMPAT\"; use\"ROOT.ML\" handle _ => exit 1;" -cq SYSTEM Pure
|