src/CTT/Makefile
author clasohm
Tue, 21 Nov 1995 15:10:12 +0100
changeset 1361 90d615b599d9
parent 1294 1358dc040edb
child 1491 38a14548baad
permissions -rw-r--r--
main directory is now read by exit_use_dir, too; removed make_chart from ROOT.ML
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1294
1358dc040edb added calls of init_html and make_chart;
clasohm
parents: 953
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 (CTT)			#
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  
1294
1358dc040edb added calls of init_html and make_chart;
clasohm
parents: 953
diff changeset
     9
#	make
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
#To make the system and test it on standard examples, type  
1294
1358dc040edb added calls of init_html and make_chart;
clasohm
parents: 953
diff changeset
    11
#	make test
1358dc040edb added calls of init_html and make_chart;
clasohm
parents: 953
diff changeset
    12
#To generate HTML files for every theory, set the environment variable
1358dc040edb added calls of init_html and make_chart;
clasohm
parents: 953
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 pure Isabelle (Pure) 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)
335
5623ca25803f renamed theory files
clasohm
parents: 101
diff changeset
    24
FILES = 	ROOT.ML CTT.thy CTT.ML Bool.thy Bool.ML \
5623ca25803f renamed theory files
clasohm
parents: 101
diff changeset
    25
		Arith.thy Arith.ML rew.ML ../Provers/typedsimp.ML
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
101
d4730dd72226 Target "test" now depends on examples files
lcp
parents: 0
diff changeset
    27
EX_FILES = ex/ROOT.ML ex/elim.ML ex/equal.ML ex/synth.ML ex/typechk.ML
d4730dd72226 Target "test" now depends on examples files
lcp
parents: 0
diff changeset
    28
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    29
$(BIN)/CTT:   $(BIN)/Pure  $(FILES) 
409
54fcef4db0db added test for $ISABELLEBIN=source directory, to
lcp
parents: 335
diff changeset
    30
	if [ -d $${ISABELLEBIN:?}/Pure ];\
54fcef4db0db added test for $ISABELLEBIN=source directory, to
lcp
parents: 335
diff changeset
    31
           	then echo Bad value for ISABELLEBIN: \
54fcef4db0db added test for $ISABELLEBIN=source directory, to
lcp
parents: 335
diff changeset
    32
                	$(BIN) is the Isabelle source directory; \
54fcef4db0db added test for $ISABELLEBIN=source directory, to
lcp
parents: 335
diff changeset
    33
                	exit 1; \
54fcef4db0db added test for $ISABELLEBIN=source directory, to
lcp
parents: 335
diff changeset
    34
           	fi;\
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
	case "$(COMP)" in \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
	poly*)	echo 'make_database"$(BIN)/CTT"; quit();'  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
			| $(COMP) $(BIN)/Pure;\
1294
1358dc040edb added calls of init_html and make_chart;
clasohm
parents: 953
diff changeset
    38
                if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
1361
90d615b599d9 main directory is now read by exit_use_dir, too;
clasohm
parents: 1294
diff changeset
    39
                then echo 'open PolyML; make_html := true; exit_use_dir".";' \
1294
1358dc040edb added calls of init_html and make_chart;
clasohm
parents: 953
diff changeset
    40
                       | $(COMP) $(BIN)/CTT;\
1361
90d615b599d9 main directory is now read by exit_use_dir, too;
clasohm
parents: 1294
diff changeset
    41
		else echo 'open PolyML; exit_use_dir".";' \
90d615b599d9 main directory is now read by exit_use_dir, too;
clasohm
parents: 1294
diff changeset
    42
                       | $(COMP) $(BIN)/CTT;\
1294
1358dc040edb added calls of init_html and make_chart;
clasohm
parents: 953
diff changeset
    43
                fi;;\
1358dc040edb added calls of init_html and make_chart;
clasohm
parents: 953
diff changeset
    44
	sml*)	if [ "$${MAKE_HTML-undefined}" != "undefined" ];\
1361
90d615b599d9 main directory is now read by exit_use_dir, too;
clasohm
parents: 1294
diff changeset
    45
                then echo 'make_html := true; exit_use_dir".";                                            xML"$(BIN)/CTT" banner;' | $(BIN)/Pure;\
90d615b599d9 main directory is now read by exit_use_dir, too;
clasohm
parents: 1294
diff changeset
    46
                else echo 'exit_use_dir"."; xML"$(BIN)/CTT" banner;' \
1294
1358dc040edb added calls of init_html and make_chart;
clasohm
parents: 953
diff changeset
    47
                       | $(BIN)/Pure;\
1358dc040edb added calls of init_html and make_chart;
clasohm
parents: 953
diff changeset
    48
                fi;;\
409
54fcef4db0db added test for $ISABELLEBIN=source directory, to
lcp
parents: 335
diff changeset
    49
	*)	echo Bad value for ISABELLECOMP: \
54fcef4db0db added test for $ISABELLEBIN=source directory, to
lcp
parents: 335
diff changeset
    50
                	$(COMP) is not poly or sml;;\
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    51
	esac
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    52
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    53
$(BIN)/Pure:
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    54
	cd ../Pure;  $(MAKE)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    55
101
d4730dd72226 Target "test" now depends on examples files
lcp
parents: 0
diff changeset
    56
test:   ex/ROOT.ML $(BIN)/CTT  $(EX_FILES) 
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    57
	case "$(COMP)" in \
953
17d7fad9c9a2 Now calls exit_use instead of use, for prompt failure if errors are detected.
lcp
parents: 409
diff changeset
    58
	poly*)	echo 'exit_use"ex/ROOT.ML"; quit();' | $(COMP) $(BIN)/CTT ;;\
17d7fad9c9a2 Now calls exit_use instead of use, for prompt failure if errors are detected.
lcp
parents: 409
diff changeset
    59
	sml*)	echo 'exit_use"ex/ROOT.ML";' | $(BIN)/CTT;;\
409
54fcef4db0db added test for $ISABELLEBIN=source directory, to
lcp
parents: 335
diff changeset
    60
	*)	echo Bad value for ISABELLECOMP: \
54fcef4db0db added test for $ISABELLEBIN=source directory, to
lcp
parents: 335
diff changeset
    61
                	$(COMP) is not poly or sml;;\
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    62
	esac
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    63
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    64
.PRECIOUS:  $(BIN)/Pure  $(BIN)/CTT