diff: tests/hard_coded/Mmakefile subdir bug fixes

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 3 20:21:01 AEDT 1998


tests/hard_coded/Mmakefile:
	Fix a couple of bugs introduced when dgj added a `typeclasses'
	subdirectory:
	- ensure that `mmake clean' and `mmake realclean' recursively
	  clean the subdirectories
	- when recursively invoking the Mmakefiles in subdirectories,
	  make sure we pass down the values of the GRADE, EXTRA_CFLAGS
	  and EXTRA_MCFLAGS variables.

cvs diff  tests/hard_coded/Mmakefile
Index: tests/hard_coded/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/Mmakefile,v
retrieving revision 1.13
diff -u -r1.13 Mmakefile
--- Mmakefile	1998/01/29 23:54:58	1.13
+++ Mmakefile	1998/02/03 09:15:23
@@ -92,29 +92,44 @@
 
 #-----------------------------------------------------------------------------#
 
+SUBDIR_MMAKE = mmake $(MMAKEFLAGS) \
+			GRADE=$(GRADE) \
+			EXTRA_CFLAGS=$(EXTRA_CFLAGS) \
+			EXTRA_MCFLAGS=$(EXTRA_MCFLAGS)
+
 dep:	$(DEPS)
 	for dir in $(SUBDIRS); do \
-		(cd $$dir && mmake $(MMAKEFLAGS) dep) || exit 1; \
+		(cd $$dir && $(SUBDIR_MMAKE) dep) || exit 1; \
 	done
 
 depend:	$(DEPENDS)
 	for dir in $(SUBDIRS); do \
-		(cd $$dir && mmake $(MMAKEFLAGS) depend) || exit 1; \
+		(cd $$dir && $(SUBDIR_MMAKE) depend) || exit 1; \
 	done
 
 check:	$(OUTS) $(RESS)
 	for dir in $(SUBDIRS); do \
-		(cd $$dir && mmake $(MMAKEFLAGS) check) || exit 1; \
+		(cd $$dir && $(SUBDIR_MMAKE) check) || exit 1; \
 	done
 
 mods:	$(MODS)
 	for dir in $(SUBDIRS); do \
-		(cd $$dir && mmake $(MMAKEFLAGS) mods) || exit 1; \
+		(cd $$dir && $(SUBDIR_MMAKE) mods) || exit 1; \
 	done
 
 all:	$(PROGS)
 	for dir in $(SUBDIRS); do \
-		(cd $$dir && mmake $(MMAKEFLAGS) all) || exit 1; \
+		(cd $$dir && $(SUBDIR_MMAKE) all) || exit 1; \
+	done
+
+clean:
+	for dir in $(SUBDIRS); do \
+		(cd $$dir && $(SUBDIR_MMAKE) clean) || exit 1; \
+	done
+
+realclean:
+	for dir in $(SUBDIRS); do \
+		(cd $$dir && $(SUBDIR_MMAKE) realclean) || exit 1; \
 	done
 
 #-----------------------------------------------------------------------------#

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list