src/ZF/Makefile
author lcp
Thu, 06 Apr 1995 12:08:43 +0200
changeset 1014 8bec0698d58c
parent 993 eab3015d97f0
child 1059 6ad22ffb188b
permissions -rw-r--r--
Added Id: line
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1014
8bec0698d58c Added Id: line
lcp
parents: 993
diff changeset
     1
#  $Id$
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
#########################################################################
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
#									#
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
# 			Makefile for Isabelle (ZF)			#
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
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
#	make -f Makefile 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
#To make the system and test it on standard examples, type 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
#	make -f Makefile test
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    13
#Environment variable ISABELLECOMP specifies the compiler.
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
#Environment variable ISABELLEBIN specifies the destination directory.
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
#For Poly/ML, ISABELLEBIN must begin with a /
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
#Makes FOL if this file is ABSENT -- but not 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
#if it is out of date, since this Makefile does not know its dependencies!
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
BIN = $(ISABELLEBIN)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
COMP = $(ISABELLECOMP)
993
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    22
NAMES = ZF upair subset pair domrange \
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    23
	func AC simpdata equalities Bool \
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    24
	Sum QPair mono Fixedpt ind_syntax add_ind_def \
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    25
	constructor intr_elim indrule Inductive Perm Rel EquivClass Trancl \
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    26
	WF Order Ordinal Epsilon Arith Univ \
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    27
	QUniv Datatype OrderArith OrderType \
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    28
	Cardinal CardinalArith Cardinal_AC InfDatatype \
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    29
	Zorn Nat Finite List 
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    30
993
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    31
FILES = ROOT.ML thy_syntax.ML ../Pure/section_utils.ML \
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    32
 	$(NAMES:%=%.thy) $(NAMES:%=%.ML)
102
e04cb6295a3f Target "test" now depends on examples files
lcp
parents: 92
diff changeset
    33
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    34
#Uses cp rather than make_database because Poly/ML allows only 3 levels
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
$(BIN)/ZF:   $(BIN)/FOL  $(FILES) 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
	case "$(COMP)" in \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
	poly*)	cp $(BIN)/FOL $(BIN)/ZF;\
956
cc929b9ddc80 Now calls exit_use instead of use, for prompt failure if errors are detected.
lcp
parents: 917
diff changeset
    38
		echo 'open PolyML; exit_use"ROOT";' | $(COMP) $(BIN)/ZF ;;\
cc929b9ddc80 Now calls exit_use instead of use, for prompt failure if errors are detected.
lcp
parents: 917
diff changeset
    39
	sml*)	echo 'exit_use"ROOT.ML"; xML"$(BIN)/ZF" banner;' | $(BIN)/FOL;;\
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 363
diff changeset
    40
	*)	echo Bad value for ISABELLECOMP: \
917
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    41
                	$(COMP) is not poly or sml; exit 1;;\
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    42
	esac
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    43
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    44
$(BIN)/FOL:
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    45
	cd ../FOL;  $(MAKE)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    46
917
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    47
#### Testing of ZF
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    48
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    49
#A macro referring to the object-logic (depends on ML compiler)
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    50
LOGIC:sh=case $ISABELLECOMP in \
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    51
	poly*)	echo "$ISABELLECOMP $ISABELLEBIN/ZF" ;;\
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    52
	sml*)	echo "$ISABELLEBIN/ZF" ;;\
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    53
	*)	echo "echo Bad value for ISABELLECOMP: \
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    54
                	$ISABELLEBIN is not poly or sml; exit 1" ;;\
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    55
	esac
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    56
917
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    57
##IMP-semantics example
993
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    58
IMP_NAMES = Com Denotation Equiv
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    59
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
    60
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    61
IMP:   $(BIN)/ZF  $(IMP_FILES)
956
cc929b9ddc80 Now calls exit_use instead of use, for prompt failure if errors are detected.
lcp
parents: 917
diff changeset
    62
	echo 'exit_use"IMP/ROOT.ML";quit();' | $(LOGIC)
917
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    63
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    64
##Coinduction example
993
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    65
COIND_NAMES = ECR Language MT Map Static Types Values 
917
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    66
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    67
COIND_FILES = Coind/ROOT.ML Coind/BCR.thy  Coind/Dynamic.thy \
993
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    68
              $(COIND_NAMES:%=Coind/%.thy) $(COIND_NAMES:%=Coind/%.ML)
917
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    69
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    70
Coind:  $(BIN)/ZF  $(COIND_FILES)
956
cc929b9ddc80 Now calls exit_use instead of use, for prompt failure if errors are detected.
lcp
parents: 917
diff changeset
    71
	echo 'exit_use"Coind/ROOT.ML";quit();' | $(LOGIC)
917
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    72
993
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    73
##AC examples
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    74
AC_NAMES = AC_Equiv OrdQuant Transrec2 WO6_WO1 rel_is_fun
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    75
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    76
AC_FILES = AC/ROOT.ML $(AC_NAMES:%=AC/%.thy) $(AC_NAMES:%=AC/%.ML)
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    77
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    78
AC:  $(BIN)/ZF  $(AC_FILES)
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    79
	echo 'exit_use"AC/ROOT.ML";quit();' | $(LOGIC)
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    80
917
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    81
##Miscellaneous examples
993
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    82
EX_NAMES = Ramsey Integ twos_compl Bin BT Term TF Ntree Brouwer Data Enum \
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    83
	   Rmap PropLog ListN Acc Comb Primrec LList CoUnit 
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    84
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    85
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
    86
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    87
#Test ZF by loading the examples in directory ex
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    88
ex:     $(BIN)/ZF  $(EX_FILES)
956
cc929b9ddc80 Now calls exit_use instead of use, for prompt failure if errors are detected.
lcp
parents: 917
diff changeset
    89
	echo 'exit_use"ex/ROOT.ML";quit();' | $(LOGIC)
917
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    90
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    91
#Full test.
993
eab3015d97f0 Simplified using pattern replacements. Added the AC example.
lcp
parents: 956
diff changeset
    92
test:   $(BIN)/ZF IMP Coind AC ex
917
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    93
	echo 'Test examples ran successfully' > test
bd26f536e1fe Re-organised to perform the tests independently. Now test
lcp
parents: 798
diff changeset
    94
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    95
.PRECIOUS:  $(BIN)/FOL $(BIN)/ZF