trivial diff: more --warn-undefined-variables fixes

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Apr 2 23:21:14 AEST 1998


Make another small fix to mmake.in and add more empty definitions for various
Mmake variables to avoid spurious warnings.

scripts/mmake.in:
	Add `*clean*' to the patterns for which we do not
	pass `--warn-undefined-variables'.

scripts/Mmake.rules:
	When invoking make recursively, pass $(MFLAGS) rather than
	$(MAKEOVERRIDES).  This avoids a warning, and is probably the
	right thing to do anyway (I'm not sure why I used MAKEOVERRIDES
	in the first place).

boehm_gc/Mmakefile:
tests/hard_coded/Mmakefile:
	Add empty definition for `MMAKEFLAGS'.

cvs diff  boehm_gc/Mmakefile scripts/Mmake.rules scripts/mmake.in tests/hard_coded/Mmakefile
Index: boehm_gc/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/Mmakefile,v
retrieving revision 1.5
diff -u -r1.5 Mmakefile
--- Mmakefile	1998/03/30 13:02:59	1.5
+++ Mmakefile	1998/04/02 12:55:18
@@ -23,6 +23,8 @@
 
 libgc$(PROF).dll: submake
 
+MMAKEFLAGS=
+
 #	We need to export MAKEFLAGS="" to avoid passing the `-r' (suppress
 #	builtin rules) supplied by Mmake to the boehm_gc Makefile, which
 #	needs the builtin rules. 
Index: scripts/Mmake.rules
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.rules,v
retrieving revision 1.57
diff -u -r1.57 Mmake.rules
--- Mmake.rules	1998/03/27 16:36:56	1.57
+++ Mmake.rules	1998/04/02 12:36:24
@@ -167,7 +167,7 @@
 ifneq ($(RM_C),:)
 
 $(os_subdir)%.o : %.m
-	$(MMAKE_MAKE_CMD) $(MAKEOVERRIDES) $(cs_subdir)$*.c
+	$(MMAKE_MAKE_CMD) $(MFLAGS) $(cs_subdir)$*.c
 	$(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) -c $(cs_subdir)$*.c -o $@
 	$(RM_C) $(cs_subdir)$*.c
 
Index: scripts/mmake.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mmake.in,v
retrieving revision 1.19
diff -u -r1.19 mmake.in
--- mmake.in	1998/03/30 13:03:17	1.19
+++ mmake.in	1998/04/02 12:44:41
@@ -175,9 +175,11 @@
 MMAKE_MAKE_CMD="${MMAKE_MAKE} -f $tmp -r"
 
 # Enable checking for undefined variables -- but not when making the
-# dependencies.
+# dependencies, or when cleaning up, because in either of those two
+# cases the dependencies might not have been made yet, so there may be
+# lots of undefined variables.
 case "$@" in
-	dep*|' dep'*|*.dep*)
+	dep*|' dep'*|*.dep*|*clean*)
 		MMAKE_MAKE_OPTS=""
 		;;
 	*)
Index: tests/hard_coded/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/Mmakefile,v
retrieving revision 1.24
diff -u -r1.24 Mmakefile
--- Mmakefile	1998/04/02 13:18:45	1.24
+++ Mmakefile	1998/04/02 13:19:07
@@ -113,6 +113,8 @@
 
 #-----------------------------------------------------------------------------#
 
+MMAKEFLAGS =
+
 SUBDIR_MMAKE = mmake $(MMAKEFLAGS) \
 			GRADE='$(GRADE)' \
 			EXTRA_CFLAGS='$(EXTRA_CFLAGS)' \
-- 
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