src/HOL/Makefile
author clasohm
Wed Oct 04 13:10:03 1995 +0100 (1995-10-04)
changeset 1264 3eb91524b938
parent 1254 a28e04685adc
child 1270 e3a391e848a9
permissions -rw-r--r--
added local simpsets; removed IOA from 'make test'
     1 #########################################################################
     2 #									#
     3 # 			Makefile for Isabelle (HOL)			#
     4 #									#
     5 #########################################################################
     6 
     7 #To make the system, cd to this directory and type  
     8 #	make -f Makefile 
     9 #To make the system and test it on standard examples, type  
    10 #	make -f Makefile test
    11 
    12 #Environment variable ISABELLECOMP specifies the compiler.
    13 #Environment variable ISABELLEBIN specifies the destination directory.
    14 #For Poly/ML, ISABELLEBIN must begin with a /
    15 
    16 #Makes pure Isabelle (Pure) if this file is ABSENT -- but not 
    17 #if it is out of date, since this Makefile does not know its dependencies!
    18 
    19 BIN = $(ISABELLEBIN)
    20 COMP = $(ISABELLECOMP)
    21 NAMES = HOL Ord Set Fun subset equalities Prod Relation Trancl Sum WF \
    22        mono Lfp Gfp Nat Inductive Finite Arith Sexp Univ List 
    23 
    24 FILES = ROOT.ML add_ind_def.ML datatype.ML hologic.ML\
    25 	ind_syntax.ML indrule.ML intr_elim.ML simpdata.ML\
    26 	subtype.ML thy_syntax.ML ../Pure/section_utils.ML\
    27 	../Provers/hypsubst.ML ../Provers/classical.ML\
    28         ../Provers/simplifier.ML ../Provers/splitter.ML\
    29  	$(NAMES:%=%.thy) $(NAMES:%=%.ML)
    30 
    31 $(BIN)/HOL:   $(BIN)/Pure  $(FILES) 
    32 	if [ -d $${ISABELLEBIN:?}/Pure ];\
    33            	then echo Bad value for ISABELLEBIN: \
    34                 	$(BIN) is the Isabelle source directory; \
    35                 	exit 1; \
    36            	fi;\
    37 	case "$(COMP)" in \
    38 	poly*)	echo 'make_database"$(BIN)/HOL"; quit();'  \
    39 			| $(COMP) $(BIN)/Pure;\
    40 		echo 'open PolyML; exit_use"ROOT";' | $(COMP) $(BIN)/HOL ;;\
    41 	sml*)	echo 'exit_use"ROOT.ML"; xML"$(BIN)/HOL" banner;' | $(BIN)/Pure ;;\
    42 	*)	echo Bad value for ISABELLECOMP: \
    43                 	$(COMP) is not poly or sml; exit 1;;\
    44 	esac
    45 
    46 $(BIN)/Pure:
    47 	cd ../Pure;  $(MAKE)
    48 
    49 #### Testing of HOL
    50 
    51 #A macro referring to the object-logic (depends on ML compiler)
    52 LOGIC:sh=case $ISABELLECOMP in \
    53 	poly*)	echo "$ISABELLECOMP $ISABELLEBIN/HOL" ;;\
    54 	sml*)	echo "$ISABELLEBIN/HOL" ;;\
    55 	*)	echo "echo Bad value for ISABELLECOMP: \
    56                 	$ISABELLEBIN is not poly or sml; exit 1" ;;\
    57 	esac
    58 
    59 ##IMP-semantics example
    60 IMP_NAMES = Com Denotation Equiv Properties
    61 IMP_FILES = IMP/ROOT.ML $(IMP_NAMES:%=IMP/%.thy) $(IMP_NAMES:%=IMP/%.ML)
    62 
    63 IMP:    $(BIN)/HOL  $(IMP_FILES)
    64 	echo 'exit_use"IMP/ROOT.ML";quit();' | $(LOGIC)
    65 
    66 ##The integers in HOL
    67 INTEG_NAMES = Equiv Integ 
    68 
    69 INTEG_FILES = Integ/ROOT.ML \
    70               $(INTEG_NAMES:%=Integ/%.thy) $(INTEG_NAMES:%=Integ/%.ML)
    71 
    72 Integ:  $(BIN)/HOL  $(INTEG_FILES)
    73 	echo 'exit_use"Integ/ROOT.ML";quit();' | $(LOGIC)
    74 
    75 ##I/O Automata
    76 IOA_NTP_NAMES = Abschannel Action Correctness Impl Lemmas Multiset Packet\
    77                 Receiver Sender
    78 IOA_ABP_NAMES = Action Correctness Lemmas
    79 IOA_MT_NAMES = Asig IOA Option Solve
    80 
    81 IOA_FILES = IOA/ROOT_NTP.ML IOA/ROOT_ABP.ML IOA/NTP/Spec.thy\
    82  $(IOA_NTP_NAMES:%=IOA/NTP/%.thy) $(IOA_NTP_NAMES:%=IOA/NTP/%.ML)\
    83  IOA/ABP/Abschannel.thy IOA/ABP/Abschannel_finite.thy IOA/ABP/Env.thy\
    84  IOA/ABP/Impl.thy IOA/ABP/Impl_finite.thy IOA/ABP/Packet.thy\
    85  IOA/ABP/Receiver.thy IOA/ABP/Sender.thy IOA/ABP/Spec.thy\
    86  $(IOA_ABP_NAMES:%=IOA/ABP/%.thy) $(IOA_ABP_NAMES:%=IOA/ABP/%.ML)\
    87  $(IOA_MT_NAMES:%=IOA/meta_theory/%.thy) $(IOA_MT_NAMES:%=IOA/meta_theory/%.ML)
    88 
    89 IOA:    $(BIN)/HOL  $(IOA_FILES)
    90 	echo 'exit_use"IOA/ROOT_NTP.ML";quit();' | $(LOGIC)
    91 #	echo 'exit_use"IOA/ROOT_ABP.ML";quit();' | $(LOGIC)
    92 
    93 ##Properties of substitutions
    94 SUBST_NAMES = AList Setplus Subst Unifier UTerm UTLemmas
    95 
    96 SUBST_FILES = Subst/ROOT.ML \
    97               $(SUBST_NAMES:%=Subst/%.thy) $(SUBST_NAMES:%=Subst/%.ML)
    98 
    99 Subst:  $(BIN)/HOL  $(SUBST_FILES)
   100 	echo 'exit_use"Subst/ROOT.ML";quit();' | $(LOGIC)
   101 
   102 ##Confluence of Lambda-calculus
   103 LAMBDA_NAMES = Lambda ParRed Confluence
   104 
   105 LAMBDA_FILES = Lambda/ROOT.ML \
   106               $(LAMBDA_NAMES:%=Lambda/%.thy) $(LAMBDA_NAMES:%=Lambda/%.ML)
   107 
   108 Lambda:  $(BIN)/HOL  $(LAMBDA_FILES)
   109 	echo 'exit_use"Lambda/ROOT.ML";quit();' | $(LOGIC)
   110 
   111 ##Miscellaneous examples
   112 EX_NAMES = LexProd MT Acc PropLog Puzzle Qsort LList Rec Simult Term String \
   113 	   BT Perm
   114 
   115 EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \
   116            ex/set.ML $(EX_NAMES:%=ex/%.thy) $(EX_NAMES:%=ex/%.ML)
   117 
   118 ex:     $(BIN)/HOL  $(EX_FILES)
   119 	echo 'exit_use"ex/ROOT.ML";quit();' | $(LOGIC)
   120 
   121 #Full test. (IOA has been removed temporarily)
   122 test:   $(BIN)/HOL IMP Integ Subst Lambda ex
   123 	echo 'Test examples ran successfully' > test
   124 
   125 .PRECIOUS:  $(BIN)/Pure $(BIN)/HOL