src/CCL/Makefile
author clasohm
Sat Feb 10 19:04:21 1996 +0100 (1996-02-10)
changeset 1491 38a14548baad
parent 1361 90d615b599d9
child 2023 aa25f20c5d8b
permissions -rw-r--r--
make_html now only remains set if MAKE_HTML=true
     1 # $Id$
     2 #########################################################################
     3 #									#
     4 # 			Makefile for Isabelle (CCL)			#
     5 #									#
     6 #########################################################################
     7 
     8 #To make the system, cd to this directory and type
     9 #	make
    10 #To make the system and test it on standard examples, type 
    11 #	make test
    12 #To generate HTML files for every theory, set the environment variable
    13 #MAKE_HTML or add the parameter "MAKE_HTML=".
    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)
    24 
    25 SET_FILES = ROOT.ML Set.thy Set.ML subset.ML equalities.ML mono.ML \
    26 	    Gfp.thy Gfp.ML Lfp.thy Lfp.ML
    27 
    28 CCL_FILES = CCL.thy CCL.ML Term.thy Term.ML Type.thy Type.ML \
    29             coinduction.ML Hered.thy Hered.ML Trancl.thy Trancl.ML\
    30             Wfd.thy Wfd.ML genrec.ML typecheck.ML eval.ML Fix.thy Fix.ML
    31 
    32 EX_FILES = ex/ROOT.ML ex/Flag.ML ex/Flag.thy ex/List.ML ex/List.thy\
    33 	   ex/Nat.ML ex/Nat.thy ex/Stream.ML ex/Stream.thy
    34 
    35 #Uses cp rather than make_database because Poly/ML allows only 3 levels
    36 $(BIN)/CCL:   $(BIN)/FOL  $(SET_FILES)  $(CCL_FILES) 
    37 	case "$(COMP)" in \
    38 	poly*)	cp $(BIN)/FOL $(BIN)/CCL;\
    39                 if [ "$${MAKE_HTML}" = "true" ]; \
    40                 then echo 'open PolyML; make_html := true; exit_use_dir".";' \
    41                        | $(COMP) $(BIN)/CCL;\
    42 		elif [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
    43                 then echo 'open PolyML; make_html := true; exit_use_dir".";                               make_html := false;' | $(COMP) $(BIN)/CCL;\
    44                 else echo 'open PolyML; exit_use_dir".";' \
    45                        | $(COMP) $(BIN)/CCL;\
    46                 fi;;\
    47 	sml*)   if [ "$${MAKE_HTML}" = "true" ]; \
    48                 then echo 'make_html := true; exit_use_dir".";                                            xML"$(BIN)/CCL" banner;' | $(BIN)/FOL;\
    49                 elif [ "$${MAKE_HTML-undefined}" != "undefined" ];\
    50                 then echo 'make_html := true; exit_use_dir".";                                            make_html := false; xML"$(BIN)/CCL" banner;' \
    51                        | $(BIN)/FOL;\
    52                 else echo 'exit_use_dir"."; xML"$(BIN)/CCL" banner;' \
    53                        | $(BIN)/FOL;\
    54                 fi;;\
    55 	*)	echo Bad value for ISABELLECOMP: \
    56                 	$(COMP) is not poly or sml;;\
    57 	esac
    58 
    59 $(BIN)/FOL:
    60 	cd ../FOL;  $(MAKE)
    61 
    62 test:   ex/ROOT.ML  $(BIN)/CCL  $(EX_FILES)
    63 	case "$(COMP)" in \
    64 	poly*)	if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
    65                 then echo 'make_html := true; exit_use_dir"ex"; quit();' \
    66                        | $(COMP) $(BIN)/CCL;\
    67                 else echo 'exit_use_dir"ex"; quit();' | $(COMP) $(BIN)/CCL;\
    68                 fi;;\
    69 	sml*)	if [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
    70                 then echo 'make_html := true; exit_use_dir"ex";' \
    71                        | $(BIN)/CCL;\
    72                 else echo 'exit_use_dir"ex";' | $(BIN)/CCL;\
    73                 fi;;\
    74 	*)	echo Bad value for ISABELLECOMP: \
    75                 	$(COMP) is not poly or sml;;\
    76 	esac
    77 
    78 .PRECIOUS:  $(BIN)/FOL $(BIN)/CCL