#! /bin/sh# $Id$#Make all systems afresh# Creates gzipped log files called makeNNNN.log.gz on each subdirectory and# displays the last few lines of these files -- this indicates whether# the "make" failed (whether it terminated due to an error)# switches are# -noforce don't delete old databases/images first# -clean delete databases/images after use (leaving Pure)# -notest make databases/images w/o running the examples# -noexec don't execute, just check settings and Makefiles#Environment variables required:# ISABELLEBIN: the directory to hold Poly/ML databases or New Jersey ML images# ISABELLECOMP: the ML compiler# A typical shell script for /bin/sh is...# ML_DBASE=/usr/groups/theory/poly2.04/`arch`/ML_dbase# ISABELLEBIN=/homes/`whoami`/bin# ISABELLECOMP="/usr/bin/poly -noDisplay"# export ML_DBASE ISABELLEBIN ISABELLECOMP # nohup make-all $*set -e #fail immediately upon errors# process command line switchesCLEAN="off";FORCE="on";TEST="test";EXEC="on";NO="";for A in $*do case $A in -clean) CLEAN="on" ;; -noforce) FORCE="off" ;; -notest) TEST="" ;; -noexec) EXEC="off" NO="-n" ;; *) echo "Bad flag for make-all: $A" echo "Usage: make-all [-noforce] [-clean] [-notest] [-noexec]" exit ;; esacdoneecho Started at `date`echo Source=`pwd`echo Destination=${ISABELLEBIN?'No destination directory specified'}echo force=$FORCE ' ' clean=$CLEAN ' 'echo Compiler=${ISABELLECOMP?'No compiler specified'} echo Running on `hostname`echo Log files will be called make$$.log.gzcase $TEST in test) echo; echo ' **** Full test: WILL TAKE MANY HOURS ****' echo ' **** Consider the -notest switch ****'esaccase $FORCE.$EXEC in on.on) (cd $ISABELLEBIN; for f in Pure FOL ZF CCL LCF CTT Sequents HOL HOLCF Cube FOLP do rm -f $f $f.heap done)esacset +e #no longer fail upon errors -- e.g. if a "make" failsechoechoecho '*****Pure Isabelle*****'(cd Pure; make $NO > make$$.log)tail Pure/make$$.loggzip Pure/make$$.logechoechoecho '*****First-Order Logic (FOL)*****'(cd FOL; make $NO $TEST > make$$.log)tail FOL/make$$.loggzip FOL/make$$.log#cannot delete FOL yet... it is needed for ZF, CCL and LCF!echoechoecho '*****Set theory (ZF)*****'(cd ZF; make $NO $TEST > make$$.log)tail ZF/make$$.loggzip ZF/make$$.logcase $CLEAN.$EXEC in on.on) rm -f $ISABELLEBIN/ZF $ISABELLEBIN/ZF.heapesacechoechoecho '*****Classical Computational Logic (CCL)*****'(cd CCL; make $NO $TEST > make$$.log)tail CCL/make$$.loggzip CCL/make$$.logcase $CLEAN.$EXEC in on.on) rm -f $ISABELLEBIN/CCL $ISABELLEBIN/CCL.heapesacechoechoecho '*****Domain Theory (LCF)*****'(cd LCF; make $NO $TEST > make$$.log)tail LCF/make$$.loggzip LCF/make$$.logcase $CLEAN.$EXEC in on.on) rm -f $ISABELLEBIN/FOL $ISABELLEBIN/FOL.heap \ $ISABELLEBIN/LCF $ISABELLEBIN/LCF.heapesacechoechoecho '*****Constructive Type Theory (CTT)*****'(cd CTT; make $NO $TEST > make$$.log)tail CTT/make$$.loggzip CTT/make$$.logcase $CLEAN.$EXEC in on.on) rm -f $ISABELLEBIN/CTT $ISABELLEBIN/CTT.heapesacechoechoecho '*****Sequent Calculi (Sequents)*****'(cd Sequents; make $NO $TEST > make$$.log)tail Sequents/make$$.loggzip Sequents/make$$.logcase $CLEAN.$EXEC in on.on) rm -f $ISABELLEBIN/Sequents $ISABELLEBIN/Sequents.heapesacechoechoecho '*****Curried Higher-Order Logic (HOL)*****'(cd HOL; make $NO $TEST > make$$.log)tail HOL/make$$.loggzip HOL/make$$.log#cannot delete HOL yet... it is needed for HOLCF!echoechoecho '*****LCF in HOL (HOLCF)*****'(cd HOLCF; make $NO $TEST > make$$.log)tail HOLCF/make$$.loggzip HOLCF/make$$.logcase $CLEAN.$EXEC in on.on) rm -f $ISABELLEBIN/HOL $ISABELLEBIN/HOL.heap \ $ISABELLEBIN/HOLCF $ISABELLEBIN/HOLCF.heapesacechoechoecho '*****The Lambda-Cube (Cube)*****'(cd Cube; make $NO $TEST > make$$.log)case $CLEAN.$EXEC in on.on) rm -f $ISABELLEBIN/Cube $ISABELLEBIN/Cube.heapesactail Cube/make$$.log gzip Cube/make$$.log echoechoecho '*****First-Order Logic with Proof Terms (FOLP)*****'(cd FOLP; make $NO $TEST > make$$.log)case $CLEAN.$EXEC in on.on) rm -f $ISABELLEBIN/FOLP $ISABELLEBIN/FOLP.heapesactail FOLP/make$$.log gzip FOLP/make$$.log case $TEST.$EXEC in test.on) echo echo '***** Now check the dates on the "test" files *****' ls -lrt FOL/test ZF/test CCL/test LCF/test CTT/test\ Sequents/test HOL/test HOLCF/test\ Cube/test FOLP/testesacecho Finished at `date`