Makefile
author clasohm
Sun, 06 Nov 1994 21:04:39 +0100
changeset 164 028a32af4c4d
parent 157 45d0cf6e309d
child 170 3a8d722fd3ff
permissions -rw-r--r--
changed command for making 'test'

#########################################################################
#									#
# 			Makefile for Isabelle (HOL)			#
#									#
#########################################################################

#To make the system, cd to this directory and type  
#	make -f Makefile 
#To make the system and test it on standard examples, type  
#	make -f Makefile test

#Environment variable ISABELLECOMP specifies the compiler.
#Environment variable ISABELLEBIN specifies the destination directory.
#For Poly/ML, ISABELLEBIN must begin with a /

#Makes pure Isabelle (Pure) if this file is ABSENT -- but not 
#if it is out of date, since this Makefile does not know its dependencies!

BIN = $(ISABELLEBIN)
COMP = $(ISABELLECOMP)
FILES = ROOT.ML HOL.thy HOL.ML simpdata.ML Ord.thy Ord.ML \
	Set.thy Set.ML Fun.thy Fun.ML subset.thy subset.ML \
	equalities.thy equalities.ML \
	Prod.thy Prod.ML Sum.thy Sum.ML WF.thy WF.ML \
	mono.thy mono.ML Lfp.thy Lfp.ML Gfp.thy Gfp.ML Nat.thy Nat.ML \
	add_ind_def.ML ind_syntax.ML indrule.ML Inductive.ML \
	intr_elim.ML datatype.ML ../Pure/section_utils.ML\
	Finite.ML Finite.thy\
        Arith.thy Arith.ML Sexp.thy Sexp.ML Univ.thy Univ.ML \
        List.thy List.ML \
	../Provers/classical.ML ../Provers/simplifier.ML \
	../Provers/splitter.ML ../Provers/ind.ML

IMP_FILES = IMP/ROOT.ML IMP/Com.ML IMP/Com.thy IMP/Denotation.ML\
            IMP/Denotation.thy IMP/Equiv.ML IMP/Equiv.thy

IOA_FILES = IOA/ROOT.ML IOA/example/Action.ML IOA/example/Action.thy\
            IOA/example/Channels.ML IOA/example/Channels.thy\
            IOA/example/Correctness.ML IOA/example/Correctness.thy\
            IOA/example/Impl.ML IOA/example/Impl.thy IOA/example/Lemmas.ML\
            IOA/example/Lemmas.thy IOA/example/Multiset.ML\
            IOA/example/Multiset.thy IOA/example/Packet.thy\
            IOA/example/Receiver.ML IOA/example/Receiver.thy\
            IOA/example/Sender.ML IOA/example/Sender.thy IOA/example/Spec.thy\
            IOA/meta_theory/Asig.thy IOA/meta_theory/IOA.ML\
            IOA/meta_theory/IOA.thy IOA/meta_theory/Option.ML\
            IOA/meta_theory/Option.thy IOA/meta_theory/Solve.ML\
            IOA/meta_theory/Solve.thy

EX_FILES = ex/ROOT.ML ex/cla.ML \
	   ex/LexProd.ML ex/LexProd.thy ex/meson.ML ex/mesontest.ML\
	   ex/MT.ML ex/MT.thy ex/Acc.ML ex/Acc.thy \
           ex/PropLog.ML ex/PropLog.thy ex/Puzzle.ML ex/Puzzle.thy\
           ex/Qsort.thy ex/Qsort.ML ex/LList.thy ex/LList.ML \
	   ex/Rec.ML ex/Rec.thy ex/rel.ML ex/set.ML ex/Simult.ML ex/Simult.thy\
	   ex/Term.ML ex/Term.thy

SUBST_FILES = Subst/ROOT.ML Subst/AList.ML Subst/AList.thy\
              Subst/Setplus.ML Subst/Setplus.thy\
              Subst/Subst.ML Subst/Subst.thy\
              Subst/Unifier.ML Subst/Unifier.thy\
              Subst/UTerm.ML Subst/UTerm.thy\
              Subst/UTLemmas.ML Subst/UTLemmas.thy

$(BIN)/HOL:   $(BIN)/Pure  $(FILES) 
	if [ -d $${ISABELLEBIN:?}/Pure ];\
           	then echo Bad value for ISABELLEBIN: \
                	$(BIN) is the Isabelle source directory; \
                	exit 1; \
           	fi;\
	case "$(COMP)" in \
	poly*)	echo 'make_database"$(BIN)/HOL"; quit();'  \
			| $(COMP) $(BIN)/Pure;\
		echo 'open PolyML; use"ROOT";' | $(COMP) $(BIN)/HOL ;;\
	sml*)	echo 'use"ROOT.ML"; xML"$(BIN)/HOL" banner;' | $(BIN)/Pure ;;\
	*)	echo Bad value for ISABELLECOMP: \
                	$(COMP) is not poly or sml;;\
	esac

$(BIN)/Pure:
	cd ../Pure;  $(MAKE)

#Directories IMP and Subst also test the system
#Load ex/ROOT.ML last since it creates the file "test"
test:   $(BIN)/HOL  $(IMP_FILES) $(IOA_FILES) $(SUBST_FILES)  $(EX_FILES)
	case "$(COMP)" in \
	poly*)	echo '(use"IMP/ROOT.ML"; use"IOA/ROOT.ML"; use"Subst/ROOT.ML"; use"ex/ROOT.ML"); quit();' \
                        | $(COMP) $(BIN)/HOL ;;\
	sml*)	echo 'use"IMP/ROOT.ML"; use"IOA/ROOT.ML"; use"Subst/ROOT.ML"; use"ex/ROOT.ML";' | $(BIN)/HOL;;\
	*)	echo Bad value for ISABELLECOMP: \
                	$(COMP) is not poly or sml;;\
	esac

.PRECIOUS:  $(BIN)/Pure  $(BIN)/HOL