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