diff:

Zoltan Somogyi zs at cs.mu.oz.au
Thu Nov 6 14:31:59 AEDT 1997


makebatch:
	Add an option that allows the preservation of the generated stage 2
	compiler even if the bootcheck fails; this can be useful in
	investigating *why* it failed.

Zoltan.

cvs diff: Diffing .
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing doc
cvs diff: Diffing library
cvs diff: Diffing lp_solve
cvs diff: Diffing lp_solve/lp_examples
cvs diff: Diffing profiler
cvs diff: Diffing runtime
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/diff
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/general
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
Index: tools/makebatch
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/makebatch,v
retrieving revision 1.6
diff -u -u -r1.6 makebatch
--- makebatch	1996/12/30 10:09:47	1.6
+++ makebatch	1997/05/24 19:17:33
@@ -13,21 +13,26 @@
 #
 # The output goes in $batch.mercury_compile.$n.gz; the size of the versions
 # are put in $batch.sizes. If a bootcheck fails, the bootcheck output goes
-# in $batch.out.$n.
+# in $batch.out.$n; the compiler will be thrown away unless the -f flag is
+# given.
 #
 # The file $batch.checkpoint records which version is to be built next.
 # Reinvoking makebatch while this file exist will cause it to start from
 # that version. When makebatch exits normally, it removes the file to indicate
 # completion.
 
-usage="Usage: makebatch [-jN] [-t] batchname"
+usage="Usage: makebatch [-jN] [-ft] batchname"
 jfactor=-j1
 runtests=""
+failed="notwanted"
 
 while test $# -gt 0
 do
 	case $1 in
 
+	-f|--failed-compilers)
+		failed="wanted" ;;
+
 	-j|--jobs)
 		jfactor="-j$2" ; shift ;;
 	-j*)
@@ -121,7 +126,22 @@
 		/bin/rm -f batch/$batch.mercury_compile.$n.gz > /dev/null 2>&1
 		gzip batch/$batch.mercury_compile.$n
 	else
-		echo bootcheck of version $n failed
+		if test "$failed" = "wanted"
+		then
+			if test -x stage2/compiler/mercury_compile
+			then
+				echo bootcheck of version $n failed but produced compiler
+				mv stage2/compiler/mercury_compile batch/$batch.mercury_compile.$n
+				size batch/$batch.mercury_compile.$n | tail -1 >> batch/$batch.sizes
+				/bin/rm -f batch/$batch.mercury_compile.$n.gz > /dev/null 2>&1
+				gzip batch/$batch.mercury_compile.$n
+
+			else
+				echo bootcheck of version $n failed and did not produce compiler
+			fi
+		else
+			echo bootcheck of version $n failed
+		fi
 	fi
 	n=`expr $n + 1`
 	echo $n > batch/$batch.checkpoint
cvs diff: Diffing trial
cvs diff: Diffing util



More information about the developers mailing list