src/Pure/mk
author wenzelm
Tue, 20 May 1997 19:29:50 +0200
changeset 3257 4e3724e0659f
parent 3118 24dae6222579
child 3505 1cb4ea47d967
permissions -rwxr-xr-x
README generation;

#!/bin/bash
#
# $Id$
#
# mk - build Pure Isabelle.
#
# Assumes to be called via Isabelle make utility (cf. IsaMakefile).


## diagnostics

function fail()
{
  echo "$1" >&2
  exit 2
}


## main

ML_SYSTEM_BASE=$(echo $ML_SYSTEM | cut -f1 -d-)
[ -z "$ML_SYSTEM" ] && \
  fail "Missing ML system settings! Probably not run via 'isatool make'?."

COMPAT=""
[ -f "ML-Systems/$ML_SYSTEM_BASE.ML" ] && COMPAT="ML-Systems/$ML_SYSTEM_BASE.ML"
[ -f "ML-Systems/$ML_SYSTEM.ML" ] && COMPAT="ML-Systems/$ML_SYSTEM.ML"
[ -z "$COMPAT" ] && fail "Missing compatibility file for ML system \"$ML_SYSTEM\"!"

$ISABELLE \
  -e "val ml_system = \"$ML_SYSTEM\";" \
  -e "use\"$COMPAT\"; use\"ROOT.ML\" handle _ => exit 1;" \
  -q RAW_ML_SYSTEM Pure

chmod -w $ISABELLE_OUTPUT/Pure