src/ZF/Makefile
author paulson
Fri, 31 Jan 1997 17:13:19 +0100
changeset 2572 8a47f85e7a03
parent 2469 b50b8c0eec01
permissions -rw-r--r--
ex_impE was incorrectly listed as Safe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1296
ae31bb7774a7 added calls of init_html and make_chart
clasohm
parents: 1282
diff changeset
     1
# $Id$
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
#########################################################################
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
#									#
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
     4
#			Makefile for Isabelle (ZF)			#
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
#									#
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
#########################################################################
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
#To make the system, cd to this directory and type
1296
ae31bb7774a7 added calls of init_html and make_chart
clasohm
parents: 1282
diff changeset
     9
#	make
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
#To make the system and test it on standard examples, type 
1296
ae31bb7774a7 added calls of init_html and make_chart
clasohm
parents: 1282
diff changeset
    11
#	make test
ae31bb7774a7 added calls of init_html and make_chart
clasohm
parents: 1282
diff changeset
    12
#To generate HTML files for every theory, set the environment variable
ae31bb7774a7 added calls of init_html and make_chart
clasohm
parents: 1282
diff changeset
    13
#MAKE_HTML or add the parameter "MAKE_HTML=".
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
#Environment variable ISABELLECOMP specifies the compiler.
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
#Environment variable ISABELLEBIN specifies the destination directory.
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
#For Poly/ML, ISABELLEBIN must begin with a /
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
#Makes FOL if this file is ABSENT -- but not 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
#if it is out of date, since this Makefile does not know its dependencies!
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
BIN = $(ISABELLEBIN)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    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
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 2235
diff changeset
    25
	func AC equalities Bool \
1733
89dd6ca7ee6c Added new name cartprod
paulson
parents: 1607
diff changeset
    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
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 2235
diff changeset
    33
FILES = ROOT.ML thy_syntax.ML ../Pure/section_utils.ML simpdata.ML typechk.ML\
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    34
	$(NAMES:%=%.thy) $(NAMES:%=%.ML)
102
e04cb6295a3f Target "test" now depends on examples files
lcp
parents: 92
diff changeset
    35
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
#Uses cp rather than make_database because Poly/ML allows only 3 levels
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    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
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    39
	poly*)	cp $(BIN)/FOL $(BIN)/ZF;\
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    40
		if [ "$${MAKE_HTML}" = "true" ]; \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    41
		then echo 'open PolyML; make_html := true; exit_use_dir".";' \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    42
		       | $(COMP) $(BIN)/ZF;\
1491
38a14548baad make_html now only remains set if MAKE_HTML=true
clasohm
parents: 1361
diff changeset
    43
		elif [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    44
		then echo 'open PolyML; make_html := true; exit_use_dir".";				  make_html := false;' | $(COMP) $(BIN)/ZF;\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    45
		else echo 'open PolyML; exit_use_dir".";' \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    46
		       | $(COMP) $(BIN)/ZF;\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    47
		fi;\
2023
aa25f20c5d8b Calls discgarb -c to realize dramatic space savings!
paulson
parents: 1803
diff changeset
    48
		discgarb -c $(BIN)/ZF;;\
1491
38a14548baad make_html now only remains set if MAKE_HTML=true
clasohm
parents: 1361
diff changeset
    49
	sml*)	if [ "$${MAKE_HTML}" = "true" ]; \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    50
		then echo 'make_html := true; exit_use_dir".";						  xML"$(BIN)/ZF" banner;' | $(BIN)/FOL;\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    51
		elif [ "$${MAKE_HTML-undefined}" != "undefined" ];\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    52
		then echo 'make_html := true; exit_use_dir".";						  make_html := false; xML"$(BIN)/ZF" banner;' \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    53
		       | $(BIN)/FOL;\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    54
		else echo 'exit_use_dir"."; xML"$(BIN)/ZF" banner;' \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    55
		       | $(BIN)/FOL;\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    56
		fi;;\
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 363
diff changeset
    57
	*)	echo Bad value for ISABELLECOMP: \
2117
292df12bace5 ISABELLECOMP may now have a leading pathname
paulson
parents: 2094
diff changeset
    58
			\"$(COMP)\" is not poly or sml; exit 1;;\
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    59
	esac
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    60
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    61
$(BIN)/FOL:
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    62
	cd ../FOL;  $(MAKE)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    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
292df12bace5 ISABELLECOMP may now have a leading pathname
paulson
parents: 2094
diff changeset
    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
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    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
292df12bace5 ISABELLECOMP may now have a leading pathname
paulson
parents: 2094
diff changeset
    80
	@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    81
	then echo 'make_html := true; exit_use_dir"IMP";quit();' | $(LOGIC); \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    82
	else echo 'exit_use_dir"IMP";quit();' | $(LOGIC); \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    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
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 2235
diff changeset
    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
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 2235
diff changeset
    88
COIND_FILES = Coind/ROOT.ML Coind/Language.thy Coind/BCR.thy Coind/Dynamic.thy\
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    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
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    91
Coind:	$(BIN)/ZF  $(COIND_FILES)
2117
292df12bace5 ISABELLECOMP may now have a leading pathname
paulson
parents: 2094
diff changeset
    92
	@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    93
	then echo 'make_html := true; exit_use_dir"Coind";quit();' | $(LOGIC);\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    94
	else echo 'exit_use_dir"Coind";quit();' | $(LOGIC); \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    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
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 2235
diff changeset
    98
AC_NAMES = AC_Equiv Cardinal_aux \
1199
c8e58352b1a5 Now includes all the AC files
lcp
parents: 1059
diff changeset
    99
	   AC15_WO6 AC16_WO4 AC16_lemmas AC17_AC1 AC18_AC19 AC1_WO2 \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   100
	   DC DC_lemmas HH Hartog WO1_AC \
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 2235
diff changeset
   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
c8e58352b1a5 Now includes all the AC files
lcp
parents: 1059
diff changeset
   103
AC_FILES = AC/ROOT.ML AC/AC0_AC1.ML AC/AC10_AC15.ML AC/AC1_AC17.ML \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   104
	   AC/AC2_AC6.ML AC/AC7_AC9.ML \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   105
	   AC/WO1_WO6.ML AC/WO1_WO7.ML AC/WO1_WO8.ML \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   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
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   108
AC:  $(BIN)/ZF	$(AC_FILES)
2117
292df12bace5 ISABELLECOMP may now have a leading pathname
paulson
parents: 2094
diff changeset
   109
	@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   110
	then echo 'make_html := true; exit_use_dir"AC";quit();' | $(LOGIC); \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   111
	else echo 'exit_use_dir"AC";quit();' | $(LOGIC); \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   112
	fi
993
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
   113
1059
6ad22ffb188b Now builds Resid as a test
lcp
parents: 1014
diff changeset
   114
##Residuals example
6ad22ffb188b Now builds Resid as a test
lcp
parents: 1014
diff changeset
   115
6ad22ffb188b Now builds Resid as a test
lcp
parents: 1014
diff changeset
   116
RESID_NAMES = Confluence Redex SubUnion Conversion Reduction Substitution \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   117
	      Cube Residuals Terms
1059
6ad22ffb188b Now builds Resid as a test
lcp
parents: 1014
diff changeset
   118
6ad22ffb188b Now builds Resid as a test
lcp
parents: 1014
diff changeset
   119
RESID_FILES = Resid/ROOT.ML $(RESID_NAMES:%=Resid/%.thy) \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   120
			    $(RESID_NAMES:%=Resid/%.ML)
1059
6ad22ffb188b Now builds Resid as a test
lcp
parents: 1014
diff changeset
   121
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   122
Resid:	$(BIN)/ZF  $(RESID_FILES)
2117
292df12bace5 ISABELLECOMP may now have a leading pathname
paulson
parents: 2094
diff changeset
   123
	@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   124
	then echo 'make_html := true; exit_use_dir"Resid";quit();' | $(LOGIC);\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   125
	else echo 'exit_use_dir"Resid";quit();' | $(LOGIC); \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   126
	fi
1059
6ad22ffb188b Now builds Resid as a test
lcp
parents: 1014
diff changeset
   127
917
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
   128
##Miscellaneous examples
1803
ff4cb897dfd3 Added Primes to list of theories in target ex
paulson
parents: 1733
diff changeset
   129
EX_NAMES = Primes Ramsey Limit Integ twos_compl Bin BT Term TF Ntree Brouwer \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   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
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   135
ex:	$(BIN)/ZF  $(EX_FILES)
2117
292df12bace5 ISABELLECOMP may now have a leading pathname
paulson
parents: 2094
diff changeset
   136
	@if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   137
	then echo 'make_html := true; exit_use_dir"ex";quit();' | $(LOGIC); \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   138
	else echo 'exit_use_dir"ex";quit();' | $(LOGIC); \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   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
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
   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
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   145
.PRECIOUS:  $(BIN)/FOL $(BIN)/ZF