[m-dev.] diff: makebatch -o

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Aug 23 15:32:29 AEST 1999


tools/makebatch:
	Add an option that allows the object files from failed bootchecks to be
	saved, for space measurement purposes (e.g. for the RTTI paper).

Zoltan.

cvs diff: Diffing .
Index: makebatch
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/makebatch,v
retrieving revision 1.9
diff -u -b -r1.9 makebatch
--- makebatch	1999/04/16 07:00:47	1.9
+++ makebatch	1999/06/21 00:03:15
@@ -21,9 +21,10 @@
 # that version. When makebatch exits normally, it removes the file to indicate
 # completion.
 
-usage="Usage: makebatch [-jN] [-ft] batchname"
+usage="Usage: makebatch [-jN] [-fot] batchname"
 jfactor=-j1
 runtests=""
+objects=""
 failed="notwanted"
 
 while test $# -gt 0
@@ -40,6 +41,9 @@
 	--jobs*)
 		jfactor="--jobs` expr $1 : '--jobs\(.*\)' `" ;;
 
+	-o|--object-files)
+		objects="-k" ;;
+
 	-t|--no-test-suite)
 		runtests="-t" ;;
 
@@ -116,7 +120,7 @@
 
 	cp Mmake.stage.params batch/$batch.params.$n
 	echo starting bootcheck of version $n
-	if tools/bootcheck -r $jfactor $runtests > batch/$batch.out.$n 2>&1
+	if tools/bootcheck -r $jfactor $runtests $objects > batch/$batch.out.$n 2>&1
 	then
 		echo bootcheck of version $n succeeded
 		echo bootcheck succeeded > batch/$batch.out.$n
@@ -143,6 +147,20 @@
 			echo bootcheck of version $n failed
 		fi
 	fi
+
+	if test "$objects" = "-k"
+	then
+		echo saving object files
+		mkdir -p batch/objs/$batch.library.$n
+		/bin/rm -fr batch/objs/$batch.library.$n/*
+		cp stage2/library/*.o batch/objs/$batch.library.$n
+		gzip batch/objs/$batch.library.$n/*
+		mkdir -p batch/objs/$batch.compiler.$n
+		/bin/rm -fr batch/objs/$batch.compiler.$n/*
+		cp stage2/compiler/*.o batch/objs/$batch.compiler.$n
+		gzip batch/objs/$batch.compiler.$n/*
+	fi
+
 	n=`expr $n + 1`
 	echo $n > batch/$batch.checkpoint
 done
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list