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