lib/Tools/makeall
author griff
Tue, 03 Apr 2012 17:26:30 +0900
changeset 47433 07f4bf913230
parent 32390 468eff174a77
permissions -rwxr-xr-x
renamed "rel_comp" to "relcomp" (to be consistent with, e.g., "relpow")

#!/usr/bin/env bash
#
# Author: Markus Wenzel, TU Muenchen
#
# DESCRIPTION: apply make utility to all logics

## diagnostics

PRG="$(basename "$0")"

function usage()
{
  echo
  echo "Usage: isabelle $PRG [ARGS ...]"
  echo
  echo "  Apply isabelle make to all components with IsaMakefile (passing ARGS)."
  echo
  exit 1
}

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


## main

[ "$1" = "-?" ] && usage

FAIL=""

echo "Started at $(date) ($ML_IDENTIFIER on $(hostname))"
. "$ISABELLE_HOME/lib/scripts/timestart.bash"

splitarray ":" "$ISABELLE_COMPONENTS"; COMPONENTS=("${SPLITARRAY[@]}")

for DIR in "${COMPONENTS[@]}"
do
  if [ -f "$DIR/IsaMakefile" ]; then
    NAME="$(basename "$DIR")"
    ( cd "$DIR"; "$ISABELLE_TOOL" make "$@" ) || FAIL="$FAIL$NAME "
  fi
done

echo -n "Finished at "; date

. "$ISABELLE_HOME/lib/scripts/timestop.bash"
echo "$TIMES_REPORT"

[ "$FAIL" = "" ] || fail "Logics ${FAIL}FAILED!"