Makefile
author lcp
Wed, 01 Jun 1994 13:24:54 +0200
changeset 78 f5e5a6b8c4d3
parent 70 9459592608e2
child 97 3f4976d8c97f
permissions -rw-r--r--
added test for $ISABELLEBIN=source directory, to avoid isabelle/Pure being mistaken for bin/Pure

#########################################################################
#									#
# 			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 \
	fun.ML Set.thy Set.ML subset.ML equalities.ML \
	Prod.thy Prod.ML Sum.thy Sum.ML WF.thy WF.ML \
	mono.ML Lfp.thy Lfp.ML Gfp.thy Gfp.ML Nat.thy Nat.ML \
        Arith.thy Arith.ML Sexp.thy Sexp.ML Univ.thy Univ.ML \
        LList.thy LList.ML List.thy List.ML \
	Datatype.ML \
	../Provers/classical.ML ../Provers/simplifier.ML \
	../Provers/splitter.ML ../Provers/ind.ML

EX_FILES = ex/ROOT.ML ex/cla.ML ex/Finite.ML ex/Finite.thy\
	   ex/LexProd.ML ex/LexProd.thy ex/meson.ML ex/mesontest.ML\
	   ex/MT.ML ex/MT.thy ex/PL.ML ex/PL.thy ex/Puzzle.ML ex/Puzzle.thy\
           ex/Qsort.thy ex/Qsort.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)

test:   ex/ROOT.ML  $(BIN)/HOL  $(EX_FILES) 
	case "$(COMP)" in \
	poly*)	echo 'use"ex/ROOT.ML"; use"Subst/ROOT.ML"; quit();' \
                        | $(COMP) $(BIN)/HOL ;;\
	sml*)	echo 'use"ex/ROOT.ML";use"Subst/ROOT.ML";' | $(BIN)/HOL;;\
	*)	echo Bad value for ISABELLECOMP: \
                	$(COMP) is not poly or sml;;\
	esac

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