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

BANNER = Constructive Type Theory

#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

#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!

#Directory of Poly/ML databases
#WARNING: Poly/ML databases may fail if copied or moved!
DESTDIR=/homes/lcp/dbases
DRIVER = poly #Uses the standard DBASE to make root version

ML_FILES = 	ROOT.ML  syntax.ML  .rules.ML  resolve.ML\
		bool.ML  arith.ML   rew.ML


$(DESTDIR)/CTT:   $(DESTDIR)/Pure  $(ML_FILES) 
	echo 'make_database("CTT", "$(DESTDIR)/CTT");  quit();'\
		 | $(DRIVER) $(DESTDIR)/Pure 
	echo 'PolyML.use "ROOT";'  |  $(DRIVER) $(DESTDIR)/CTT 

$(DESTDIR)/Pure:
	cd ..;  $(MAKE) DRIVER=$(DRIVER) DESTDIR=$(DESTDIR) 

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

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

.PRECIOUS:  $(DESTDIR)/Pure  $(DESTDIR)/CTT 
.SUFFIXES:
