[m-rev.] for review: installing the default grade

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Oct 14 21:56:16 AEST 2002


For review by Zoltan.

Estimated hours taken: 0.75
Branches: main

Change things so that LIBGRADES includes the default grade.
This fixes a bug that sometimes caused the libraries not to be
installed in the default grade, e.g. when $(GRADE) is set in Mmake.params.

configure.in:
	Don't delete $(GRADE) from $(LIBGRADES).

Mmakefile:
scripts/Mmake.rules:
	Change the loops over $(ALL_LIBGRADES) so that they skip $(GRADE).

scripts/Mmake.vars.in:
	Delete an bogus assignment setting LIBGRADES to empty, since it
	wasn't being used (LIBGRADES was being assigned again below).
	Update the documentation for LIBGRADES.

Workspace: /home/ceres/fjh/ws-ceres2/mercury
Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.87
diff -u -d -r1.87 Mmakefile
--- Mmakefile	23 Sep 2002 17:22:26 -0000	1.87
+++ Mmakefile	14 Oct 2002 11:43:50 -0000
@@ -425,8 +425,8 @@
 	# runs the newly installed compiler, rather than using the
 	# bootstrap compiler.
 	#
-	+for grade in x $(LIBGRADES); do \
-	    if [ "$$grade" != "x" ]; then \
+	+for grade in $(LIBGRADES); do \
+	    if [ "$$grade" != "$(GRADE)" ]; then \
 	    	gc_grade=`scripts/ml --grade $$grade --print-gc-grade`; \
 	        ( cd boehm_gc && \
 		  $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade GC_GRADE=$$gc_grade \
@@ -485,7 +485,7 @@
 	done || true && \
 	{ mv -f $(deps_subdir)*.dep $(deps_subdir)*.dv *.$O Mercury/os/*.$O \
 		*.$A *.so tmp_dir || true; } && \
-	for grade in $(GRADE) $(LIBGRADES); do \
+	for grade in $(LIBGRADES); do \
 	        $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade depend && \
 	        $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade install_split_library || \
 			{ scripts/mercury_cleanup_install; exit 1; }; \
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.325
diff -u -d -r1.325 configure.in
--- configure.in	14 Oct 2002 08:01:27 -0000	1.325
+++ configure.in	14 Oct 2002 11:37:42 -0000
@@ -2299,17 +2299,6 @@
 
 MERCURY_MSG("using \`$LIBGRADES' as the set of library grades to install")
 
-# Remove GRADE from LIBGRADES.  This is done because `mmake install_main'
-# will have already installed the libraries for grade GRADE.
-# We can only do this if GRADE is the same as DEFAULT_GRADE,
-# because LIBGRADES is used both for installing the compiler, which
-# gets build in grade GRADE, and also for installing user libraries,
-# which (presumably) get built in in DEFAULT_GRADE.
-if test $GRADE = $DEFAULT_GRADE; then
-	LIBGRADES=` echo " $LIBGRADES " | sed "s/ $GRADE / /" `
-fi
-
-
 LIBGRADE_OPTS=
 for libgrade in $LIBGRADES
 do
Index: scripts/Mmake.rules
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.rules,v
retrieving revision 1.134
diff -u -d -r1.134 Mmake.rules
--- scripts/Mmake.rules	15 Sep 2002 10:01:51 -0000	1.134
+++ scripts/Mmake.rules	14 Oct 2002 11:50:49 -0000
@@ -494,8 +494,8 @@
 	done && \
 	{ mv -f $(deps_subdir)$*.dep $(deps_subdir)$*.dv \
 		*.a *.so tmp_dir || true; } && \
-	for grade in x $(ALL_LIBGRADES); do \
-		if [ "$$grade" != "x" ]; then \
+	for grade in $(ALL_LIBGRADES); do \
+		if [ "$$grade" != "$(GRADE)" ]; then \
 			$(MMAKE) GRADE=$$grade $*.depend || \
 				exit 1; \
 			$(MMAKE) GRADE=$$grade lib$*.install_library || \
@@ -523,8 +523,8 @@
 	mkdir tmp_dir && \
 	{ mv -f $(deps_subdir)$*.dep $(deps_subdir)$*.dv $($*.mihs) \
 		$($*.dirs) *.a *.so tmp_dir || true; } && \
-	for grade in x $(ALL_LIBGRADES); do \
-		if [ "$$grade" != "x" ]; then \
+	for grade in $(ALL_LIBGRADES); do \
+		if [ "$$grade" != "$(GRADE)" ]; then \
 			$(MMAKE) GRADE=$$grade $*.depend || \
 				exit 1; \
 			$(MMAKE) GRADE=$$grade lib$*.install_split_library || \
Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.80
diff -u -d -r1.80 Mmake.vars.in
--- scripts/Mmake.vars.in	15 Sep 2002 10:01:51 -0000	1.80
+++ scripts/Mmake.vars.in	14 Oct 2002 11:46:49 -0000
@@ -343,7 +343,6 @@
 
 # List of grades to install for a library
 ALL_LIBGRADES	= $(TARGET_LIBGRADES) $(EXTRA_TARGET_LIBGRADES)
-LIBGRADES	=
 EXTRA_LIBGRADES	=
 
 # $(CFLAGS_FOR_PIC) is passed to the C compiler when creating `.pic_o' files
@@ -706,7 +705,8 @@
 
 #-----------------------------------------------------------------------------#
 
-# Specify the additional compilation models to install by default
+# Specify the compilation models to install by default.
+# This list will include the default grade.
 LIBGRADES		= @LIBGRADES@
 
 #-----------------------------------------------------------------------------#

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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