src/HOL/Makefile
author lcp
Wed Mar 15 10:34:47 1995 +0100 (1995-03-15)
changeset 953 17d7fad9c9a2
parent 944 01d6571fa106
child 1044 5bf29088250e
permissions -rw-r--r--
Now calls exit_use instead of use, for prompt failure if errors are detected.
     1 #########################################################################
     2 #									#
     3 # 			Makefile for Isabelle (CHOL)			#
     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 THYS = HOL.thy Ord.thy Set.thy Fun.thy subset.thy \
    22        equalities.thy Prod.thy Trancl.thy Sum.thy WF.thy \
    23        mono.thy Lfp.thy Gfp.thy Nat.thy Inductive.thy \
    24        Finite.thy Arith.thy Sexp.thy Univ.thy List.thy 
    25 
    26 FILES = ROOT.ML add_ind_def.ML datatype.ML hologic.ML\
    27 	ind_syntax.ML indrule.ML intr_elim.ML simpdata.ML\
    28 	subtype.ML thy_syntax.ML ../Pure/section_utils.ML\
    29 	../Provers/hypsubst.ML ../Provers/classical.ML\
    30         ../Provers/simplifier.ML ../Provers/splitter.ML\
    31         $(THYS) $(THYS:.thy=.ML)
    32 
    33 $(BIN)/CHOL:   $(BIN)/Pure  $(FILES) 
    34 	if [ -d $${ISABELLEBIN:?}/Pure ];\
    35            	then echo Bad value for ISABELLEBIN: \
    36                 	$(BIN) is the Isabelle source directory; \
    37                 	exit 1; \
    38            	fi;\
    39 	case "$(COMP)" in \
    40 	poly*)	echo 'make_database"$(BIN)/CHOL"; quit();'  \
    41 			| $(COMP) $(BIN)/Pure;\
    42 		echo 'open PolyML; exit_use"ROOT";' | $(COMP) $(BIN)/CHOL ;;\
    43 	sml*)	echo 'exit_use"ROOT.ML"; xML"$(BIN)/CHOL" banner;' | $(BIN)/Pure ;;\
    44 	*)	echo Bad value for ISABELLECOMP: \
    45                 	$(COMP) is not poly or sml; exit 1;;\
    46 	esac
    47 
    48 $(BIN)/Pure:
    49 	cd ../Pure;  $(MAKE)
    50 
    51 #### Testing of CHOL
    52 
    53 #A macro referring to the object-logic (depends on ML compiler)
    54 LOGIC:sh=case $ISABELLECOMP in \
    55 	poly*)	echo "$ISABELLECOMP $ISABELLEBIN/CHOL" ;;\
    56 	sml*)	echo "$ISABELLEBIN/CHOL" ;;\
    57 	*)	echo "echo Bad value for ISABELLECOMP: \
    58                 	$ISABELLEBIN is not poly or sml; exit 1" ;;\
    59 	esac
    60 
    61 ##IMP-semantics example
    62 IMP_THYS = IMP/Com.thy IMP/Denotation.thy IMP/Equiv.thy IMP/Properties.thy
    63 IMP_FILES = IMP/ROOT.ML $(IMP_THYS) $(IMP_THYS:.thy=.ML)
    64 
    65 IMP:    $(BIN)/CHOL  $(IMP_FILES)
    66 	echo 'exit_use"IMP/ROOT.ML";quit();' | $(LOGIC)
    67 
    68 ##The integers in CHOL
    69 INTEG_THYS = Integ/Relation.thy Integ/Equiv.thy Integ/Integ.thy 
    70 
    71 INTEG_FILES = Integ/ROOT.ML $(INTEG_THYS) $(INTEG_THYS:.thy=.ML)
    72 
    73 Integ:  $(BIN)/CHOL  $(INTEG_FILES)
    74 	echo 'exit_use"Integ/ROOT.ML";quit();' | $(LOGIC)
    75 
    76 ##I/O Automata
    77 IOA_THYS = IOA/example/Action.thy IOA/example/Channels.thy\
    78 	   IOA/example/Correctness.thy IOA/example/Impl.thy \
    79 	   IOA/example/Lemmas.thy IOA/example/Multiset.thy \
    80 	   IOA/example/Receiver.thy IOA/example/Sender.thy \
    81 	   IOA/meta_theory/Asig.thy IOA/meta_theory/IOA.thy \
    82 	   IOA/meta_theory/Option.thy IOA/meta_theory/Solve.thy
    83 
    84 IOA_FILES = IOA/ROOT.ML IOA/example/Packet.thy IOA/example/Spec.thy\
    85 	    $(IOA_THYS) $(IOA_THYS:.thy=.ML)
    86 
    87 IOA:    $(BIN)/CHOL  $(IOA_FILES)
    88 	echo 'exit_use"IOA/ROOT.ML";quit();' | $(LOGIC)
    89 
    90 ##Properties of substitutions
    91 SUBST_THYS = Subst/AList.thy Subst/Setplus.thy\
    92 	     Subst/Subst.thy Subst/Unifier.thy\
    93 	     Subst/UTerm.thy Subst/UTLemmas.thy
    94 
    95 SUBST_FILES = Subst/ROOT.ML $(SUBST_THYS) $(SUBST_THYS:.thy=.ML)
    96 
    97 Subst:  $(BIN)/CHOL  $(SUBST_FILES)
    98 	echo 'exit_use"Subst/ROOT.ML";quit();' | $(LOGIC)
    99 
   100 ##Miscellaneous examples
   101 EX_THYS = ex/LexProd.thy ex/MT.thy ex/Acc.thy \
   102 	  ex/PropLog.thy ex/Puzzle.thy ex/Qsort.thy ex/LList.thy \
   103 	  ex/Rec.thy ex/Simult.thy ex/Term.thy ex/String.thy 
   104 
   105 EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \
   106            ex/set.ML $(EX_THYS) $(EX_THYS:.thy=.ML)
   107 
   108 ex:     $(BIN)/CHOL  $(EX_FILES)
   109 	echo 'exit_use"ex/ROOT.ML";quit();' | $(LOGIC)
   110 
   111 #Full test.
   112 test:   $(BIN)/CHOL IMP Integ IOA Subst ex
   113 	echo 'Test examples ran successfully' > test
   114 
   115 .PRECIOUS:  $(BIN)/Pure $(BIN)/CHOL