#########################################################################
#									#
# 	Makefile for Isabelle	(Set Theory)				#
#									#
#########################################################################

#To make the Set Theory system, cd to this directory and type  "make BASE"

#This will make LK (../BASE) if this file is ABSENT -- but not 
#if it is out of date, since this Makefile does not know its dependencies!
#Note that Poly/ML sometimes updates ../BASE so that it appears more recent
#than it really is, forcing a needless remake of BASE.

#To make the system and test it on standard examples, type "make test".

#This Makefile is for the Poly/ML compiler.  It should be easy to adapt to
#other implementations of Standard ML.

#WARNING: Isabelle databases are created by make_database, 
#         thus may fail if copied or moved!

DRIVER = poly

SET_ML_FILES =	ROOT.ML syntax.ML .rules.ML resolve.ML subset.ML

test:   ex/ROOT.ML BASE
	echo 'PolyML.use "ex/ROOT";'  |  $(DRIVER) BASE 

BASE:   ../BASE  $(SET_ML_FILES) 
	echo 'make_database("set", "BASE");  quit();' | $(DRIVER) ../BASE
	echo 'PolyML.use "ROOT";'  |  $(DRIVER) BASE 

../BASE:
	cd ..;  $(MAKE) DRIVER=$(DRIVER)  BASE


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

.PRECIOUS:  BASE 
