[m-rev.] diff: bootcheck --skip-stage-2 and .WRITE_DEEP

Zoltan Somogyi zs at cs.mu.OZ.AU
Wed Aug 7 12:16:16 AEST 2002


tools/bootcheck:
	Add a new option, --skip-stage-2, to skip all work on the stage 2
	directory completely. This is useful if you want to reexecute
	the stage3 test using the existing stage2. (The old --keep-stage-2
	option would try to recreate the .o files in the stage2 directory
	that the previous bootcheck deleted, which is not always what you
	want.)

	Add a mechanism (the .WRITE_DEEP file) to automatically switch on the
	--write-out-profile-data option for all bootchecks in a workspace.

Zoltan.

cvs diff: Diffing .
Index: bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.131
diff -u -b -r1.131 bootcheck
--- bootcheck	2002/07/25 13:01:12	1.131
+++ bootcheck	2002/08/06 11:23:44
@@ -63,12 +63,17 @@
 	-t-, --no-test-suite
 		By default, bootcheck will also run the test quite.
 		This option prevents that.
+	--skip-stage-2
+		Take the existing stage 2 directory as given; do not run mmake
+		in it.
 	-2, --keep-stage-2
 		Don't rebuild the stage 2 directory from scratch after
-		building stage 1.  Instead use the existing stage 2 directory.
+		building stage 1. Instead use the existing stage 2 directory
+		as the starting point for mmake.
 	-3, --keep-stage-3
 		Don't rebuild the stage 3 directory from scratch after
-		building stage 1.  Instead use the existing stage 3 directory.
+		building stage 1. Instead use the existing stage 3 directory
+		as the starting point for mmake.
 	--test-params
 		When executing the test suite, use the stage 2 Mmake.params
 		file.
@@ -126,6 +131,7 @@
 copy_runtime=false
 copy_boehm_gc=false
 copy_profiler=false
+mmake_stage_2=true
 keep_stage_2=false
 keep_stage_3=false
 stop_after_stage_2=false
@@ -152,6 +158,11 @@
 	grade=`cat .BOOT_GRADE`
 fi
 
+if test -f .WRITE_DEEP
+then
+	write_out_profile_data=true
+fi
+
 # If you change these, you will also need to change scripts/ml.in,
 # scripts/c2init.in, Mmake.workspace, tools/binary, tools/binary_step
 # and tools/linear.
@@ -228,6 +239,9 @@
 	-t-|--no-test-suite)
 		runtests=false ;;
 
+	--skip-stage-2)
+		mmake_stage_2=false ;;
+
 	-2|--keep-stage-2)
 		keep_stage_2=true ;;
 
@@ -429,6 +443,8 @@
 		/bin/rm -fr $root/stage2/.[a-zA-Z]* < /dev/null
 	fi
 
+	if $mmake_stage_2
+	then
 	set +x
 	echo linking stage 2... 1>&2
 	cd stage2
@@ -463,8 +479,8 @@
 	cd $root/stage2
 	if $copy_runtime
 	then
-		# Remove symbolic link to the stage 1 runtime if it's present,
-		# which it can be with the -2 option.
+			# Remove symbolic link to the stage 1 runtime
+			# if it's present, which it can be with the -2 option.
 		rm -f runtime
 		mkdir runtime
 		cd runtime
@@ -472,8 +488,9 @@
 		$LN_S $root/runtime/*.c .
 		# We need to use $LN rather than $LN_S for the files
 		# that get processed with Microsoft's tools, since
-		# Microsoft's tools don't understand Cygwin symbolic links
-		# (hard links are OK, Cygwin's ln just makes copies).
+			# Microsoft's tools don't understand Cygwin symbolic
+			# links (hard links are OK, Cygwin's ln just makes
+			# copies).
 		$LN $root/runtime/*.cpp .
 		$LN $root/runtime/mercury_mcpp.h .
 		$LN $root/runtime/mercury_il.il .
@@ -495,8 +512,8 @@
 	fi
 	if $copy_boehm_gc
 	then
-		# Remove symbolic link to the stage 1 gc if it's present,
-		# which it can be with the -2 option.
+			# Remove symbolic link to the stage 1 gc
+			# if it's present, which it can be with the -2 option.
 		rm -f boehm_gc
 		mkdir boehm_gc
 		cd boehm_gc
@@ -633,6 +650,7 @@
 		ls -lt stage2/library/*.o
 		ls -lt stage2/compiler/*.c
 		ls -lt stage2/compiler/*.o
+		fi
 	fi
 
 	if $stop_after_stage_2
--------------------------------------------------------------------------
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