#########################################################################
#									#
# 		Makefile for Isabelle -- using Poly/ML			#
#									#
#########################################################################

BANNER = Higher-Order Logic

#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.
### !!! ISABELLEBIN must be a full pathname (beginning 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!

ML_FILES = ROOT.ML .rules.ML lemmas.ML simpdata.ML \
	fun.ML set.ML subset.ML equalities.ML \
	prod.ML sum.ML wf.ML mono.ML fixedpt.ML \
	nat.ML sexp.ML univ.ML list.ML \
	../Provers/classical.ML ../Provers/simp.ML ../Provers/ind.ML

$(ISABELLEBIN)/HOL:   $(ISABELLEBIN)/Pure  $(ML_FILES) 
	echo 'make_database"$(ISABELLEBIN)/HOL";  quit();'\
		 | $(ISABELLECOMP) $(ISABELLEBIN)/Pure 
	echo 'open PolyML; use "ROOT";'  |  $(ISABELLECOMP) $(ISABELLEBIN)/HOL 

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

test:   ex/ROOT.ML  $(ISABELLEBIN)/HOL
	echo 'use"ex/ROOT";' | $(ISABELLECOMP) $(ISABELLEBIN)/HOL 

#Note that .rules.ML should NOT be edited: it is derived from ruleshell.ML
.rules.ML: ruleshell.ML
	../make-rulenames .

.PRECIOUS:  $(ISABELLEBIN)/Pure  $(ISABELLEBIN)/HOL 
.SUFFIXES:
