[m-rev.] diff: more libgrades fall-out

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Oct 20 16:33:14 AEST 2002


Estimated hours taken: 0.25
Branches: main

Mmakefile:
	Support the case when $(LIBGRADES) is empty.
	Normally it won't be, since $(LIBGRADES) now includes $(GRADE),
	but it turns out that tools/test_mercury needs to be able
	to invoke `mmake install_split_library' with $(LIBGRADES) empty.
	tools/test_mercury needs to override $(LIBGRADES), but it can't
	easily include $(GRADE) in $(LIBGRADES) since it doesn't know
	what grade configure has chosen for $(GRADE).

Workspace: /home/ceres/fjh/mercury
Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.88
diff -u -d -r1.88 Mmakefile
--- Mmakefile	15 Oct 2002 16:23:48 -0000	1.88
+++ Mmakefile	20 Oct 2002 06:29:07 -0000
@@ -425,8 +425,8 @@
 	# runs the newly installed compiler, rather than using the
 	# bootstrap compiler.
 	#
-	+for grade in $(LIBGRADES); do \
-	    if [ "$$grade" != "$(GRADE)" ]; then \
+	+for grade in x $(LIBGRADES); do \
+	    if [ "$$grade" != "x" -a "$$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,8 @@
 	done || true && \
 	{ mv -f $(deps_subdir)*.dep $(deps_subdir)*.dv *.$O Mercury/os/*.$O \
 		*.$A *.so tmp_dir || true; } && \
-	for grade in $(LIBGRADES); do \
+	for grade in x $(LIBGRADES); do \
+	    if [ "$$grade" != "x" ]; then \
 	        $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade depend && \
 	        $(SUBDIR_MMAKE) MC=mmc GRADE=$$grade install_split_library || \
 			{ scripts/mercury_cleanup_install; exit 1; }; \
@@ -493,6 +494,7 @@
 			rm -f *.$$ext Mercury/$${ext}s/*.$$ext; \
 		done; \
 		rm -f *.$O Mercury/os/*.$O *.$A *.so; \
+	    fi; \
 	done && \
 	{ for ext in $(GRADE_SUBDIR_EXTS); do \
 	    [ -d Mercury/$${ext}s ] && mv tmp_dir/*.$$ext Mercury/$${ext}s; \

-- 
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