trivial diff for bootcheck -2 -r

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Jul 27 19:34:26 AEST 1998


tools/bootcheck:
	If the -r option is given, remove the stage2/runtime directory
	before creating it. This fixes a problem we used to have with
	the sequence

		tools/bootcheck .....
		tools/bootcheck -2 -r

	which was that the -2 caused the script to leave the stage2 directory
	in place, including the old (symlinked) stage2/runtime, which meant
	that the -r was in effect ignored (stage2/runtime already had the
	right sources), with potentially incorrect results (since
	stage2/runtime have had object files in the wrong grade
	or compiled with the wrong flags).

Zoltan.

Index: bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.58
diff -u -u -r1.58 bootcheck
--- 1.58	1998/06/19 05:13:54
+++ bootcheck	1998/07/22 07:32:48
@@ -245,8 +245,11 @@
 	cp $root/library/Mmake* .
 	ln -s $root/library/libmercury.init .
 	cd $root/stage2_sicstus
-	if test "$copy_runtime" = "true"
+	if "$copy_runtime"
 	then
+		# Remove symbolic link to the stage 1 runtime if it's present,
+		# which it can be with the -2 option.
+		rm runtime
 		mkdir runtime
 		cd runtime
 		ln -s $root/runtime/*.h .



More information about the developers mailing list