5 # mk - build Pure Isabelle.
7 # Assumes to be called via Isabelle make utility (cf. IsaMakefile).
15 echo "Usage: $PRG [OPTIONS]"
17 echo " Make Pure Isabelle."
19 echo " -r just prepare RAW image"
31 ## process command line
49 shift $(($OPTIND - 1))
59 # get compatibility file
61 ML_SYSTEM_BASE=$(echo $ML_SYSTEM | cut -f1 -d-)
62 [ -z "$ML_SYSTEM" ] && \
63 fail "Missing ML system settings! Probably not run via 'isatool make'."
66 [ -f "ML-Systems/$ML_SYSTEM_BASE.ML" ] && COMPAT="ML-Systems/$ML_SYSTEM_BASE.ML"
67 [ -f "ML-Systems/$ML_SYSTEM.ML" ] && COMPAT="ML-Systems/$ML_SYSTEM.ML"
68 [ -z "$COMPAT" ] && fail "Missing compatibility file for ML system \"$ML_SYSTEM\"!"
73 LOGDIR="$ISABELLE_OUTPUT/log"
81 if [ -z "$RAW" ]; then
83 echo -n "Building $ITEM ... "
87 -e "val ml_system = \"$ML_SYSTEM\";" \
88 -e "(use\"$COMPAT\"; use\"ROOT.ML\") handle _ => exit 1;" \
89 -q -w RAW_ML_SYSTEM Pure > $LOG 2>&1
92 echo -n "Building $ITEM ... "
96 -e "val ml_system = \"$ML_SYSTEM\";" \
97 -e "use\"$COMPAT\" handle _ => exit 1;;" \
98 -q -w RAW_ML_SYSTEM RAW > $LOG 2>&1
103 ELAPSED=$($ISABELLE_HOME/lib/scripts/showtime $SECONDS)
108 if [ $RC -eq 0 ]; then
109 echo "OK ($ELAPSED elapsed time)"
113 echo "(see also $LOG)"
114 echo; tail $LOG; echo