[m-dev.] diff: fix bug in tests/invalid/Mmakefile

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jul 15 00:02:49 AEST 1999


Estimated hours taken: 0.25

tests/invalid/Mmakefile:
	Fix a problem with the handling of the nested_impl_in_int test case
	that was causing trouble if you ran `mmake' twice in a row without
	running `mmake realclean' in between.

Workspace: /home/mercury0/fjh/mercury-other
Index: tests/invalid/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/Mmakefile,v
retrieving revision 1.42
diff -u -r1.42 Mmakefile
--- Mmakefile	1999/07/01 08:30:34	1.42
+++ Mmakefile	1999/07/14 13:54:57
@@ -81,9 +81,22 @@
 MCFLAGS-no_exports = 		--halt-at-warn
 MCFLAGS-sub_c = 		--verbose-error-messages
 
-# The bug is caught when generating dependencies, so it is
-# easiest just to do that step.
-MCFLAGS-nested_impl_in_int =	--generate-dependencies
+# The error in this test case is caught when generating dependencies,
+# so it is easiest just to do that step.  We need to be careful
+# to clean up the dependencies after we've created them,
+# otherwise if you run `mmake' twice in a row, then the
+# second time around it tries to create the interface files
+# and fails (reporting the same error that this test is _supposed_
+# to be testing for, but causing a test case failure because the
+# error is caught when creating the interface files).
+# 
+nested_impl_in_int.err: nested_impl_in_int.m
+	$(MC) $(ALL_MCFLAGS) --generate-dependencies nested_impl_in_int \
+		> nested_impl_in_int.err 2>&1; \
+	status=$$?; \
+	rm -f $(deps_subdir)nested_impl_in_int.dep; \
+	rm -f $(ds_subdir)nested_impl_in_int*.d; \
+	if [ $$status = 0 ]; then exit 1; else exit 0; fi
 
 DEPS=		$(SOURCES:%.m=%.dep)
 DEPENDS=	$(SOURCES:%.m=%.depend)

-- 
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list