[m-rev.] for review: bootcheck bug fixes

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon May 2 15:25:46 AEST 2005


For review by anyone.

Zoltan.

tools/bootcheck:
	Fix a bug: don't set MMAKE_USE_SUBDIRS and MMAKE_USE_MMC_MAKE until
	after the compilation of stage1 has been completed, since otherwise
	settings meant for stage2 can screw up stage1, e.g. by adding a Mercury
	subdirectory.

	Fix a related bug: if either --use-subdirs or --use-mmc-make is
	specified, make sure that we copy to stage2 all the directories
	that contain Mercury code, even if we normally just link them.

	Set expandtab for vim, but don't actually expand tabs yet to avoid
	a conflict with a change I have in another workspace.

cvs diff: Diffing .
Index: bootcheck
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.169
diff -u -b -r1.169 bootcheck
--- bootcheck	29 Apr 2005 01:03:27 -0000	1.169
+++ bootcheck	2 May 2005 05:23:34 -0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# vim: ts=4 sw=4 wm=0 tw=0
+# vim: ts=4 sw=4 wm=0 tw=0 et
 #---------------------------------------------------------------------------#
 # Copyright (C) 1995-2001 The University of Melbourne.
 # This file may only be copied under the terms of the GNU General
@@ -393,6 +393,11 @@
 
 case $use_subdirs in
 	yes)
+        # Since stage1 may not use subdirs, we don't want to link the stage1
+        # slice, profiler and deep_profiler directories into a stage2 that
+        # does, because that would cause the unwanted creation of Mercury
+        # subdirectories in the stage1 directories.
+        copy_profilers=true
 		cs_subdir=Mercury/cs/
 		ss_subdir=Mercury/ss/
 		ils_subdir=Mercury/ils/
@@ -404,6 +409,15 @@
 		;;
 esac
 
+case $use_mmc_make in
+    yes)
+        # Since stage1 may not use mmc_make, we don't want to link the stage1
+        # slice, profiler and deep_profiler directories into a stage2 that
+        # does, for similar reasons to the block of code above.
+        copy_profilers=true
+        ;;
+esac
+
 case $target in
 	c)
 		target_ext=c
@@ -440,12 +454,6 @@
 	copy_boehm_gc=true
 fi
 
-MMAKE_USE_SUBDIRS=$use_subdirs
-export MMAKE_USE_SUBDIRS
-
-MMAKE_USE_MMC_MAKE=$use_mmc_make
-export MMAKE_USE_MMC_MAKE
-
 #-----------------------------------------------------------------------------#
 
 if $use_cp
@@ -560,6 +568,16 @@
 		fi
 	fi
 
+	# Don't set MMAKE_USE_SUBDIRS and MMAKE_USE_MMC_MAKE until after
+	# we have finished making stage1, because $use_subdirs and $use_mmc_make
+	# come from options that are intended to affect only stages 2 and 3.
+
+	MMAKE_USE_SUBDIRS=$use_subdirs
+	export MMAKE_USE_SUBDIRS
+
+	MMAKE_USE_MMC_MAKE=$use_mmc_make
+	export MMAKE_USE_MMC_MAKE
+
 	MERCURY_OPTIONS="$NEW_MERCURY_OPTIONS"
 	export MERCURY_OPTIONS
 
@@ -1302,6 +1320,16 @@
 	diff_status=0
 	check_namespace_status=0
 	echo "building of stages 1 and 2 skipped"
+
+	# Don't set MMAKE_USE_SUBDIRS and MMAKE_USE_MMC_MAKE until after
+	# we have finished making stage1, because $use_subdirs and $use_mmc_make
+	# come from options that are intended to affect only stages 2 and 3.
+
+	MMAKE_USE_SUBDIRS=$use_subdirs
+	export MMAKE_USE_SUBDIRS
+
+	MMAKE_USE_MMC_MAKE=$use_mmc_make
+	export MMAKE_USE_MMC_MAKE
 fi
 
 #-----------------------------------------------------------------------------#
--------------------------------------------------------------------------
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