src/Pure/mk
author wenzelm
Fri, 25 Apr 1997 15:18:58 +0200
changeset 3056 200565f7592a
parent 2768 bc6d915b8019
child 3118 24dae6222579
permissions -rwxr-xr-x
removed -c option;

#!/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_DIR/Pure