author | wenzelm |
Tue, 06 May 1997 15:27:35 +0200 | |
changeset 3118 | 24dae6222579 |
parent 2469 | b50b8c0eec01 |
permissions | -rw-r--r-- |
1296 | 1 |
# $Id$ |
0 | 2 |
######################################################################### |
3 |
# # |
|
2094 | 4 |
# Makefile for Isabelle (ZF) # |
0 | 5 |
# # |
6 |
######################################################################### |
|
7 |
||
8 |
#To make the system, cd to this directory and type |
|
1296 | 9 |
# make |
0 | 10 |
#To make the system and test it on standard examples, type |
1296 | 11 |
# make test |
12 |
#To generate HTML files for every theory, set the environment variable |
|
13 |
#MAKE_HTML or add the parameter "MAKE_HTML=". |
|
0 | 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 FOL 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) |
|
993
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
24 |
NAMES = ZF upair subset pair domrange \ |
2469 | 25 |
func AC equalities Bool \ |
1733 | 26 |
Sum QPair mono Fixedpt ind_syntax cartprod add_ind_def \ |
993
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
27 |
constructor intr_elim indrule Inductive Perm Rel EquivClass Trancl \ |
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
28 |
WF Order Ordinal Epsilon Arith Univ \ |
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
29 |
QUniv Datatype OrderArith OrderType \ |
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
30 |
Cardinal CardinalArith Cardinal_AC InfDatatype \ |
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
31 |
Zorn Nat Finite List |
0 | 32 |
|
2469 | 33 |
FILES = ROOT.ML thy_syntax.ML ../Pure/section_utils.ML simpdata.ML typechk.ML\ |
2094 | 34 |
$(NAMES:%=%.thy) $(NAMES:%=%.ML) |
102 | 35 |
|
0 | 36 |
#Uses cp rather than make_database because Poly/ML allows only 3 levels |
2094 | 37 |
$(BIN)/ZF: $(BIN)/FOL $(FILES) |
2235
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
38 |
@case `basename "$(COMP)"` in \ |
0 | 39 |
poly*) cp $(BIN)/FOL $(BIN)/ZF;\ |
2094 | 40 |
if [ "$${MAKE_HTML}" = "true" ]; \ |
41 |
then echo 'open PolyML; make_html := true; exit_use_dir".";' \ |
|
42 |
| $(COMP) $(BIN)/ZF;\ |
|
1491 | 43 |
elif [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 44 |
then echo 'open PolyML; make_html := true; exit_use_dir"."; make_html := false;' | $(COMP) $(BIN)/ZF;\ |
45 |
else echo 'open PolyML; exit_use_dir".";' \ |
|
46 |
| $(COMP) $(BIN)/ZF;\ |
|
47 |
fi;\ |
|
2023
aa25f20c5d8b
Calls discgarb -c to realize dramatic space savings!
paulson
parents:
1803
diff
changeset
|
48 |
discgarb -c $(BIN)/ZF;;\ |
1491 | 49 |
sml*) if [ "$${MAKE_HTML}" = "true" ]; \ |
2094 | 50 |
then echo 'make_html := true; exit_use_dir"."; xML"$(BIN)/ZF" banner;' | $(BIN)/FOL;\ |
51 |
elif [ "$${MAKE_HTML-undefined}" != "undefined" ];\ |
|
52 |
then echo 'make_html := true; exit_use_dir"."; make_html := false; xML"$(BIN)/ZF" banner;' \ |
|
53 |
| $(BIN)/FOL;\ |
|
54 |
else echo 'exit_use_dir"."; xML"$(BIN)/ZF" banner;' \ |
|
55 |
| $(BIN)/FOL;\ |
|
56 |
fi;;\ |
|
435 | 57 |
*) echo Bad value for ISABELLECOMP: \ |
2117 | 58 |
\"$(COMP)\" is not poly or sml; exit 1;;\ |
0 | 59 |
esac |
60 |
||
61 |
$(BIN)/FOL: |
|
62 |
cd ../FOL; $(MAKE) |
|
63 |
||
917
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
64 |
#### Testing of ZF |
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
65 |
|
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
66 |
#A macro referring to the object-logic (depends on ML compiler) |
2235
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
67 |
# [Thanks to Thomas Santen and Stephan Herrmann from GMD First] |
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
68 |
LOGIC=`case \`basename "$(ISABELLECOMP)"\` in \ |
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
69 |
poly*) echo "$(ISABELLECOMP) $(ISABELLEBIN)/ZF" ;;\ |
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
70 |
sml*) echo "$(ISABELLEBIN)/ZF" ;;\ |
2117 | 71 |
*) echo "echo; echo Bad value for ISABELLECOMP: \ |
2235
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
72 |
$(ISABELLECOMP) is not poly or sml; exit 1" ;;\ |
866dbb04816c
Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents:
2117
diff
changeset
|
73 |
esac` |
0 | 74 |
|
917
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
75 |
##IMP-semantics example |
993
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
76 |
IMP_NAMES = Com Denotation Equiv |
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
77 |
IMP_FILES = IMP/ROOT.ML $(IMP_NAMES:%=IMP/%.thy) $(IMP_NAMES:%=IMP/%.ML) |
917
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
78 |
|
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
79 |
IMP: $(BIN)/ZF $(IMP_FILES) |
2117 | 80 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 81 |
then echo 'make_html := true; exit_use_dir"IMP";quit();' | $(LOGIC); \ |
82 |
else echo 'exit_use_dir"IMP";quit();' | $(LOGIC); \ |
|
83 |
fi |
|
917
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
84 |
|
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
85 |
##Coinduction example |
2469 | 86 |
COIND_NAMES = ECR MT Map Static Types Values |
917
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
87 |
|
2469 | 88 |
COIND_FILES = Coind/ROOT.ML Coind/Language.thy Coind/BCR.thy Coind/Dynamic.thy\ |
2094 | 89 |
$(COIND_NAMES:%=Coind/%.thy) $(COIND_NAMES:%=Coind/%.ML) |
917
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
90 |
|
2094 | 91 |
Coind: $(BIN)/ZF $(COIND_FILES) |
2117 | 92 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 93 |
then echo 'make_html := true; exit_use_dir"Coind";quit();' | $(LOGIC);\ |
94 |
else echo 'exit_use_dir"Coind";quit();' | $(LOGIC); \ |
|
95 |
fi |
|
917
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
96 |
|
993
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
97 |
##AC examples |
2469 | 98 |
AC_NAMES = AC_Equiv Cardinal_aux \ |
1199 | 99 |
AC15_WO6 AC16_WO4 AC16_lemmas AC17_AC1 AC18_AC19 AC1_WO2 \ |
2094 | 100 |
DC DC_lemmas HH Hartog WO1_AC \ |
2469 | 101 |
WO2_AC16 WO6_WO1 WO_AC recfunAC16 rel_is_fun |
993
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
102 |
|
1199 | 103 |
AC_FILES = AC/ROOT.ML AC/AC0_AC1.ML AC/AC10_AC15.ML AC/AC1_AC17.ML \ |
2094 | 104 |
AC/AC2_AC6.ML AC/AC7_AC9.ML \ |
105 |
AC/WO1_WO6.ML AC/WO1_WO7.ML AC/WO1_WO8.ML \ |
|
106 |
$(AC_NAMES:%=AC/%.thy) $(AC_NAMES:%=AC/%.ML) |
|
993
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
107 |
|
2094 | 108 |
AC: $(BIN)/ZF $(AC_FILES) |
2117 | 109 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 110 |
then echo 'make_html := true; exit_use_dir"AC";quit();' | $(LOGIC); \ |
111 |
else echo 'exit_use_dir"AC";quit();' | $(LOGIC); \ |
|
112 |
fi |
|
993
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
113 |
|
1059 | 114 |
##Residuals example |
115 |
||
116 |
RESID_NAMES = Confluence Redex SubUnion Conversion Reduction Substitution \ |
|
2094 | 117 |
Cube Residuals Terms |
1059 | 118 |
|
119 |
RESID_FILES = Resid/ROOT.ML $(RESID_NAMES:%=Resid/%.thy) \ |
|
2094 | 120 |
$(RESID_NAMES:%=Resid/%.ML) |
1059 | 121 |
|
2094 | 122 |
Resid: $(BIN)/ZF $(RESID_FILES) |
2117 | 123 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 124 |
then echo 'make_html := true; exit_use_dir"Resid";quit();' | $(LOGIC);\ |
125 |
else echo 'exit_use_dir"Resid";quit();' | $(LOGIC); \ |
|
126 |
fi |
|
1059 | 127 |
|
917
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
128 |
##Miscellaneous examples |
1803 | 129 |
EX_NAMES = Primes Ramsey Limit Integ twos_compl Bin BT Term TF Ntree Brouwer \ |
2094 | 130 |
Data Enum Rmap Mutil PropLog ListN Acc Comb Primrec LList CoUnit |
993
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
131 |
|
eab3015d97f0
Simplified using pattern replacements. Added the AC example.
lcp
parents:
956
diff
changeset
|
132 |
EX_FILES = ex/ROOT.ML ex/misc.ML $(EX_NAMES:%=ex/%.thy) $(EX_NAMES:%=ex/%.ML) |
917
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
133 |
|
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
134 |
#Test ZF by loading the examples in directory ex |
2094 | 135 |
ex: $(BIN)/ZF $(EX_FILES) |
2117 | 136 |
@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \ |
2094 | 137 |
then echo 'make_html := true; exit_use_dir"ex";quit();' | $(LOGIC); \ |
138 |
else echo 'exit_use_dir"ex";quit();' | $(LOGIC); \ |
|
139 |
fi |
|
917
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
140 |
|
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
141 |
#Full test. |
2094 | 142 |
test: $(BIN)/ZF IMP Coind AC Resid ex |
917
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
143 |
echo 'Test examples ran successfully' > test |
bd26f536e1fe
Re-organised to perform the tests independently. Now test
lcp
parents:
798
diff
changeset
|
144 |
|
0 | 145 |
.PRECIOUS: $(BIN)/FOL $(BIN)/ZF |