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

BANNER = ZF Set Theory (in FOL)

#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 FOL 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 syntax.ML .rules.ML lemmas.ML upair.ML subset.ML \
		pair.ML domrange.ML func.ML simpdata.ML \
		mono.ML equalities.ML sum.ML perm.ML fixedpt.ML trancl.ML \
		wf.ML ordinal.ML nat.ML epsilon.ML univ.ML

#Uses cp rather than make_database because Poly/ML allows only 3 levels
$(ISABELLEBIN)/ZF:   $(ISABELLEBIN)/FOL  $(ML_FILES) 
	cp $(ISABELLEBIN)/FOL $(ISABELLEBIN)/ZF
	echo 'open PolyML; use "ROOT";'  |  $(ISABELLECOMP) $(ISABELLEBIN)/ZF 

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

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

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

.PRECIOUS:  $(ISABELLEBIN)/FOL $(ISABELLEBIN)/ZF 
.SUFFIXES:
