[m-rev.] diff: makebatch

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu May 17 17:07:00 AEST 2001


tools/makebatch:
	Add a new option, --test-params, which cause that same option to
	be passed on to the bootchecks invoked by makebatch.

	Add a fourth control file that allows the specification of MGNUCFLAGS
	in the bootcheck.

Zoltan.

Index: makebatch
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/makebatch,v
retrieving revision 1.16
diff -u -b -r1.16 makebatch
--- makebatch	2001/05/17 05:54:27	1.16
+++ makebatch	2001/05/17 07:03:37
@@ -4,14 +4,14 @@
 #
 # The control and output files are all in the subdirectory batch.
 # The control files are $batch.MCFLAGS and possibly $batch.CFLAGS,
-# $batch.GRADE, and/or $batch.MMAKE, where $batch is the last argument
-# of makebatch. $batch.CFLAGS, $batch.GRADE and $batch.MMAKE are consulted
-# if they exist.
+# $batch.MGNUCFLAGS, $batch.GRADE, and/or $batch.MMAKE, where $batch is
+# the last argument of makebatch. $batch.CFLAGS, $batch.MGNUCFLAGS,
+# $batch.GRADE and $batch.MMAKE are consulted if they exist.
 #
-# The control files $batch.MCFLAGS, $batch.CFLAGS and $batch.GRADE must have
-# the same number of lines. Each line corresponds to a version of the compiler
-# that is built with the MCFLAGS, EXTRA_CFLAGS and GRADE make variables
-# being set from that line.
+# All the control files except $batch.MMAKE must have the same number
+# of lines. Each line corresponds to a version of the compiler that is
+# built with the MCFLAGS, EXTRA_MGNUCFLAGS, EXTRA_CFLAGS and GRADE make
+# variables being set from that line.
 #
 # The control file $batch.MMAKE contains an Mmakefile fragment that is
 # included in the parameters of all the versions being built.
@@ -25,12 +25,13 @@
 # that version. When makebatch exits normally, it removes the file to indicate
 # completion.
 
-usage="Usage: makebatch [-jN] [-cost] [--compile-times] batchname"
+usage="Usage: makebatch [-jN] [-cost] [--compile-times] [--test-params] batchname"
 jfactor=-j1
 runtests=""
 objects=""
 cfiles="false"
 compile_times=""
+testparams=""
 
 while test $# -gt 0
 do
@@ -58,6 +59,9 @@
 	--compile-times)
 		compile_times="--compile-times" ;;
 
+	--test-params)
+		test_params="--test-params" ;;
+
 	-*)	echo "$0: unknown option \`$1'" 2>&1
 		echo $usage
 		exit 1 ;;
@@ -82,6 +86,13 @@
 	exit 1
 fi
 
+if test -r batch/$batch.MGNUCFLAGS
+then
+	needmgnucflags=true
+else
+	needmgnucflags=false
+fi
+
 if test -r batch/$batch.CFLAGS
 then
 	needcflags=true
@@ -137,6 +148,12 @@
 		echo "EXTRA_CFLAGS = $cflags" >> Mmake.stage.params
 	fi
 
+	if $needmgnucflags
+	then
+		mgnucflags=`awk "NR == $n" batch/$batch.MGNUCFLAGS`
+		echo "EXTRA_MGNUCFLAGS = $mgnucflags" >> Mmake.stage.params
+	fi
+
 	if $needgrade
 	then
 		grade=`awk "NR == $n" batch/$batch.GRADE`
@@ -159,7 +176,7 @@
 	fi
 
 	echo starting bootcheck of version $visn
-	if tools/bootcheck $gradeopt -r $jfactor $runtests $objects $compile_times > batch/$batch.out.$visn 2>&1
+	if tools/bootcheck $gradeopt -r $jfactor $runtests $objects $compile_times $testparams > batch/$batch.out.$visn 2>&1
 	then
 		echo bootcheck of version $visn succeeded
 		if "$compile_times" = ""
--------------------------------------------------------------------------
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