[m-rev.] tools/makebatch --compile-times

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu Apr 26 18:45:37 AEST 2001


tools/makebatch:
	Add an option, --compile-times, for invoking bootcheck with that
	option. Make the preservation of stage 2 compilers the default.

Zoltan.

Index: tools/makebatch
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/makebatch,v
retrieving revision 1.13
diff -u -b -r1.13 makebatch
--- tools/makebatch	2000/07/19 03:45:11	1.13
+++ tools/makebatch	2001/04/25 05:10:14
@@ -18,8 +18,7 @@
 #
 # The output goes in $batch.mercury_compile.$n.gz; the sizes of the versions
 # are put in $batch.sizes. If a bootcheck fails, the bootcheck output goes
-# in $batch.out.$n; the compiler will be thrown away unless the -f flag is
-# given.
+# in $batch.out.$n.
 #
 # The file $batch.checkpoint records which version is to be built next.
 # Reinvoking makebatch while this file exists will cause it to start from
@@ -31,7 +30,7 @@
 runtests=""
 objects=""
 cfiles="false"
-failed="notwanted"
+compile_times=""
 
 while test $# -gt 0
 do
@@ -40,9 +39,6 @@
 	-c|--c-files)
 		cfiles="true" ;;
 
-	-f|--failed-compilers)
-		failed="wanted" ;;
-
 	-j|--jobs)
 		jfactor="-j$2" ; shift ;;
 	-j*)
@@ -59,6 +55,9 @@
 	-t|--no-test-suite)
 		runtests="-t" ;;
 
+	--compile-times)
+		compile_times="--compile-times" ;;
+
 	-*)	echo "$0: unknown option \`$1'" 2>&1
 		echo $usage
 		exit 1 ;;
@@ -155,10 +154,13 @@
 
 	cp Mmake.stage.params batch/$batch.params.$visn
 	echo starting bootcheck of version $visn
-	if tools/bootcheck $gradeopt -r $jfactor $runtests $objects > batch/$batch.out.$visn 2>&1
+	if tools/bootcheck $gradeopt -r $jfactor $runtests $objects $compile_times > batch/$batch.out.$visn 2>&1
 	then
 		echo bootcheck of version $visn succeeded
+		if "$compile_times" = ""
+		then
 		echo bootcheck succeeded > batch/$batch.out.$visn
+		fi
 		mv stage2/compiler/mercury_compile batch/$batch.mercury_compile.$visn
 		size batch/$batch.mercury_compile.$visn | tail -1 | sed -e 's/mercury_compile.//' | sed -e 's/batch\///' >> batch/$batch.sizes
 		/bin/rm -f batch/$batch.mercury_compile.$visn.gz > /dev/null 2>&1
@@ -167,8 +169,7 @@
 	then
 		echo bootcheck of version $visn failed
 		exit 1
-	elif test "$failed" = "wanted"
-	then
+	else
 		if test -x stage2/compiler/mercury_compile
 		then
 			echo bootcheck of version $visn failed but produced compiler
@@ -179,8 +180,6 @@
 		else
 			echo bootcheck of version $visn failed and did not produce compiler
 		fi
-	else
-		echo bootcheck of version $visn failed
 	fi
 
 	if test "$objects" = "-k"
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list