src/Cube/Makefile
author wenzelm
Fri, 07 Mar 1997 11:48:46 +0100
changeset 2754 59bd96046ad6
parent 2235 866dbb04816c
child 2818 b47926f28b21
permissions -rw-r--r--
moved settings comment to build;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1296
ae31bb7774a7 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
#									#
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
     4
#			Makefile for Isabelle (Cube)			#
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  
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
#	make 
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 test
1296
ae31bb7774a7 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
ae31bb7774a7 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
#WARNING: Poly/ML databases may fail if copied or moved!
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
#Makes pure Isabelle (Pure) if this file is ABSENT -- but not 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
#if it is out of date, since this Makefile does not know its dependencies!
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
BIN = $(ISABELLEBIN)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    24
COMP = $(ISABELLECOMP)
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    25
FILES =		ROOT.ML	 Cube.thy  Cube.ML
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    27
$(BIN)/Cube:   $(BIN)/Pure  $(FILES) 
2235
866dbb04816c Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents: 2117
diff changeset
    28
	@case `basename "$(COMP)"` in \
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    29
	poly*)	echo 'make_database"$(BIN)/Cube"; quit();'  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    30
			| $(COMP) $(BIN)/Pure;\
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    31
		if [ "$${MAKE_HTML}" = "true" ]; \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    32
		then echo 'open PolyML; make_html := true; exit_use_dir".";' \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    33
		       | $(COMP) $(BIN)/Cube;\
1491
38a14548baad make_html now only remains set if MAKE_HTML=true
clasohm
parents: 1361
diff changeset
    34
		elif [ "$${MAKE_HTML-undefined}" != "undefined" ]; \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    35
		then echo 'open PolyML; make_html := true; exit_use_dir".";				  make_html := false;' | $(COMP) $(BIN)/Cube;\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    36
		else echo 'open PolyML; exit_use_dir".";' \
1296
ae31bb7774a7 added calls of init_html and make_chart
clasohm
parents: 953
diff changeset
    37
		       | $(COMP) $(BIN)/Cube;\
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    38
		fi;\
2023
aa25f20c5d8b Calls discgarb -c to realize dramatic space savings!
paulson
parents: 1491
diff changeset
    39
		discgarb -c $(BIN)/Cube;;\
1491
38a14548baad make_html now only remains set if MAKE_HTML=true
clasohm
parents: 1361
diff changeset
    40
	sml*)	if [ "$${MAKE_HTML}" = "true" ]; \
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    41
		then echo 'make_html := true; exit_use_dir".";						  xML"$(BIN)/Cube" banner;' | $(BIN)/Pure;\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    42
		elif [ "$${MAKE_HTML-undefined}" != "undefined" ];\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    43
		then echo 'make_html := true; exit_use_dir".";						  make_html := false; xML"$(BIN)/Cube" banner;' \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    44
		       | $(BIN)/Pure;\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    45
		else echo 'exit_use_dir"."; xML"$(BIN)/Cube" banner;' \
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    46
		       | $(BIN)/Pure;\
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    47
		fi;;\
468
3dd1dcb509ac Improved error checking
lcp
parents: 335
diff changeset
    48
	*)	echo Bad value for ISABELLECOMP: \
2117
292df12bace5 ISABELLECOMP may now have a leading pathname
paulson
parents: 2094
diff changeset
    49
			\"$(COMP)\" is not poly or sml;;\
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    50
	esac
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    51
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    52
$(BIN)/Pure:
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    53
	cd ../Pure;  $(MAKE)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    54
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    55
test:	ex.ML $(BIN)/Cube
2235
866dbb04816c Makefile improvements by Thomas Santen and Stephan Herrmann
paulson
parents: 2117
diff changeset
    56
	@case `basename "$(COMP)"` in \
953
17d7fad9c9a2 Now calls exit_use instead of use, for prompt failure if errors are detected.
lcp
parents: 468
diff changeset
    57
	poly*)	echo 'exit_use"ex.ML"; quit();' | $(COMP) $(BIN)/Cube ;;\
17d7fad9c9a2 Now calls exit_use instead of use, for prompt failure if errors are detected.
lcp
parents: 468
diff changeset
    58
	sml*)	echo 'exit_use"ex.ML";' | $(BIN)/Cube;;\
468
3dd1dcb509ac Improved error checking
lcp
parents: 335
diff changeset
    59
	*)	echo Bad value for ISABELLECOMP: \
2117
292df12bace5 ISABELLECOMP may now have a leading pathname
paulson
parents: 2094
diff changeset
    60
			\"$(COMP)\" is not poly or sml;;\
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    61
	esac
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    62
2094
2061df98aab5 Removed extraneous spaces from all Makefiles
paulson
parents: 2023
diff changeset
    63
.PRECIOUS:  $(BIN)/Pure	 $(BIN)/Cube