Makefile
author lcp
Tue, 28 Feb 1995 10:48:46 +0100
changeset 221 14050d4d9b00
parent 209 cc7ad90039b9
child 228 e2245da1b601
permissions -rw-r--r--
Re-organised to perform the tests independently. Now test is defined in terms of separate targets IMP, ex, etc. If ISABELLECOMP is set wrongly then "exit 1" causes the Make to fail. Defines the macro "LOGIC" to refer to the right command for running the object-logic. Uses "suffix substitution" to shorten macro definitions.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
7949f97df77a Initial revision
clasohm
parents:
diff changeset
     1
#########################################################################
7949f97df77a Initial revision
clasohm
parents:
diff changeset
     2
#									#
7949f97df77a Initial revision
clasohm
parents:
diff changeset
     3
# 			Makefile for Isabelle (HOL)			#
7949f97df77a Initial revision
clasohm
parents:
diff changeset
     4
#									#
7949f97df77a Initial revision
clasohm
parents:
diff changeset
     5
#########################################################################
7949f97df77a Initial revision
clasohm
parents:
diff changeset
     6
7949f97df77a Initial revision
clasohm
parents:
diff changeset
     7
#To make the system, cd to this directory and type  
7949f97df77a Initial revision
clasohm
parents:
diff changeset
     8
#	make -f Makefile 
7949f97df77a Initial revision
clasohm
parents:
diff changeset
     9
#To make the system and test it on standard examples, type  
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    10
#	make -f Makefile test
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    11
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    12
#Environment variable ISABELLECOMP specifies the compiler.
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    13
#Environment variable ISABELLEBIN specifies the destination directory.
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    14
#For Poly/ML, ISABELLEBIN must begin with a /
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    15
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    16
#Makes pure Isabelle (Pure) if this file is ABSENT -- but not 
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    17
#if it is out of date, since this Makefile does not know its dependencies!
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    18
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    19
BIN = $(ISABELLEBIN)
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    20
COMP = $(ISABELLECOMP)
221
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    21
THYS = HOL.thy Ord.thy Set.thy Fun.thy subset.thy \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    22
       equalities.thy Prod.thy Trancl.thy Sum.thy WF.thy \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    23
       mono.thy Lfp.thy Gfp.thy Nat.thy Inductive.thy \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    24
       Finite.thy Arith.thy Sexp.thy Univ.thy List.thy 
133
4a2bb4fbc168 Added IMP, which necessiated changes in intr_elim.tex (mk_cases).
nipkow
parents: 129
diff changeset
    25
221
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    26
FILES = ROOT.ML add_ind_def.ML datatype.ML hologic.ML\
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    27
	ind_syntax.ML indrule.ML intr_elim.ML simpdata.ML\
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    28
	subtype.ML thy_syntax.ML ../Pure/section_utils.ML\
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    29
	../Provers/classical.ML ../Provers/simplifier.ML \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    30
	../Provers/splitter.ML ../Provers/ind.ML $(THYS) $(THYS:.thy=.ML)
16
187b73f64023 Target "test" now depends on examples files
lcp
parents: 0
diff changeset
    31
0
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    32
$(BIN)/HOL:   $(BIN)/Pure  $(FILES) 
78
f5e5a6b8c4d3 added test for $ISABELLEBIN=source directory, to
lcp
parents: 70
diff changeset
    33
	if [ -d $${ISABELLEBIN:?}/Pure ];\
f5e5a6b8c4d3 added test for $ISABELLEBIN=source directory, to
lcp
parents: 70
diff changeset
    34
           	then echo Bad value for ISABELLEBIN: \
f5e5a6b8c4d3 added test for $ISABELLEBIN=source directory, to
lcp
parents: 70
diff changeset
    35
                	$(BIN) is the Isabelle source directory; \
f5e5a6b8c4d3 added test for $ISABELLEBIN=source directory, to
lcp
parents: 70
diff changeset
    36
                	exit 1; \
f5e5a6b8c4d3 added test for $ISABELLEBIN=source directory, to
lcp
parents: 70
diff changeset
    37
           	fi;\
0
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    38
	case "$(COMP)" in \
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    39
	poly*)	echo 'make_database"$(BIN)/HOL"; quit();'  \
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    40
			| $(COMP) $(BIN)/Pure;\
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    41
		echo 'open PolyML; use"ROOT";' | $(COMP) $(BIN)/HOL ;;\
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    42
	sml*)	echo 'use"ROOT.ML"; xML"$(BIN)/HOL" banner;' | $(BIN)/Pure ;;\
78
f5e5a6b8c4d3 added test for $ISABELLEBIN=source directory, to
lcp
parents: 70
diff changeset
    43
	*)	echo Bad value for ISABELLECOMP: \
221
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    44
                	$(COMP) is not poly or sml; exit 1;;\
0
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    45
	esac
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    46
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    47
$(BIN)/Pure:
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    48
	cd ../Pure;  $(MAKE)
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    49
221
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    50
#### Testing of HOL
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    51
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    52
#A macro referring to the object-logic (depends on ML compiler)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    53
LOGIC:sh=case $ISABELLECOMP in \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    54
	poly*)	echo "$ISABELLECOMP $ISABELLEBIN/HOL" ;;\
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    55
	sml*)	echo "$ISABELLEBIN/HOL" ;;\
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    56
	*)	echo "echo Bad value for ISABELLECOMP: \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    57
                	$ISABELLEBIN is not poly or sml; exit 1" ;;\
0
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    58
	esac
7949f97df77a Initial revision
clasohm
parents:
diff changeset
    59
221
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    60
##IMP-semantics example
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    61
IMP_THYS = IMP/Com.thy IMP/Denotation.thy IMP/Equiv.thy IMP/Properties.thy
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    62
IMP_FILES = IMP/ROOT.ML $(IMP_THYS) $(IMP_THYS:.thy=.ML)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    63
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    64
IMP:    $(BIN)/HOL  $(IMP_FILES)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    65
	echo 'use"IMP/ROOT.ML";quit();' | $(LOGIC)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    66
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    67
##The integers in HOL
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    68
INTEG_THYS = Integ/Relation.thy Integ/Equiv.thy Integ/Integ.thy 
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    69
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    70
INTEG_FILES = Integ/ROOT.ML $(INTEG_THYS) $(INTEG_THYS:.thy=.ML)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    71
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    72
Integ:  $(BIN)/HOL  $(INTEG_FILES)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    73
	echo 'use"Integ/ROOT.ML";quit();' | $(LOGIC)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    74
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    75
##I/O Automata
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    76
IOA_THYS = IOA/example/Action.thy IOA/example/Channels.thy\
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    77
	   IOA/example/Correctness.thy IOA/example/Impl.thy \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    78
	   IOA/example/Lemmas.thy IOA/example/Multiset.thy \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    79
	   IOA/example/Receiver.thy IOA/example/Sender.thy \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    80
	   IOA/meta_theory/Asig.thy IOA/meta_theory/IOA.thy \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    81
	   IOA/meta_theory/Option.thy IOA/meta_theory/Solve.thy
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    82
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    83
IOA_FILES = IOA/ROOT.ML IOA/example/Packet.thy IOA/example/Spec.thy\
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    84
	    $(IOA_THYS) $(IOA_THYS:.thy=.ML)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    85
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    86
IOA:    $(BIN)/HOL  $(IOA_FILES)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    87
	echo 'use"IOA/ROOT.ML";quit();' | $(LOGIC)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    88
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    89
##Properties of substitutions
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    90
SUBST_THYS = Subst/AList.thy Subst/Setplus.thy\
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    91
	     Subst/Subst.thy Subst/Unifier.thy\
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    92
	     Subst/UTerm.thy Subst/UTLemmas.thy
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    93
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    94
SUBST_FILES = Subst/ROOT.ML $(SUBST_THYS) $(SUBST_THYS:.thy=.ML)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    95
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    96
Subst:  $(BIN)/HOL  $(SUBST_FILES)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    97
	echo 'use"Subst/ROOT.ML";quit();' | $(LOGIC)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    98
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
    99
##Miscellaneous examples
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   100
EX_THYS = ex/LexProd.thy ex/MT.thy ex/Acc.thy \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   101
	  ex/PropLog.thy ex/Puzzle.thy ex/Qsort.thy ex/LList.thy \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   102
	  ex/Rec.thy ex/Simult.thy ex/Term.thy ex/String.thy 
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   103
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   104
EX_FILES = ex/ROOT.ML ex/cla.ML ex/meson.ML ex/mesontest.ML ex/rel.ML \
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   105
           ex/set.ML $(EX_THYS) $(EX_THYS:.thy=.ML)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   106
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   107
ex:     $(BIN)/HOL  $(EX_FILES)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   108
	echo 'use"ex/ROOT.ML";quit();' | $(LOGIC)
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   109
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   110
#Full test.
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   111
test:   $(BIN)/HOL IMP Integ IOA Subst ex
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   112
	echo 'Test examples ran successfully' > test
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   113
14050d4d9b00 Re-organised to perform the tests independently. Now test
lcp
parents: 209
diff changeset
   114
.PRECIOUS:  $(BIN)/Pure $(BIN)/HOL