[m-rev.] diff: fix tests/invalid/missing_interface_import

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Sep 19 23:58:42 AEST 2002


Estimated hours taken: 2
Branches: main

tests/invalid/Mmakefile:
	Only enable the `missing_interface_import' test when
	--use-subdirs is enabled, because that test case gets
	built with --make, which implies --use-subdirs, and
	we run into problems if we try to run some tests with
	--use-subdirs and some without.

doc/user_guide.texi:
compiler/options.m:
	Document the --make implies --use-subdirs.

Workspace: /tmp/fjh/mercury/test_patch-server/mercury
Index: compiler/options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.387
diff -u -d -p -r1.387 options.m
--- compiler/options.m	9 Sep 2002 08:55:09 -0000	1.387
+++ compiler/options.m	19 Sep 2002 13:57:02 -0000
@@ -3562,7 +3562,9 @@ options_help_build_system -->
 		% when compiling a module.
 		"-m, --make",
 		"\tTreat the non-option arguments to `mmc' as files to",
-		"\tmake, rather than source files.",
+		"\tmake, rather than source files.  Create the specified",
+		"\tfiles, if they are not already up-to-date.",
+		"\tNote that this option also enables `--use-subdirs'.",
 		"-r, --rebuild",
 		"\tSame as `--make', but always rebuild the target files",
 		"\teven if they are up to date.",
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.326
diff -u -d -p -r1.326 user_guide.texi
--- doc/user_guide.texi	9 Sep 2002 07:48:20 -0000	1.326
+++ doc/user_guide.texi	19 Sep 2002 13:55:49 -0000
@@ -841,6 +841,9 @@ The advantages of the @samp{mmc --make} 
 is no @samp{mmake depend} step and the dependencies are more accurate.
 Parallel builds are not yet supported.
 
+Note that @samp{--use-subdirs} is automatically enabled if you specify
+ at samp{--mmake}.
+
 The Mmake variables above can be used by @samp{mmc --make} if they
 are set in a file called @file{Mercury.options}. The @file{Mercury.options}
 file has the same syntax as an Mmakefile, but only variable assignments and
@@ -5971,7 +5974,9 @@ do not need to be materialised.
 @findex -m
 @findex --make
 Treat the non-option arguments to @samp{mmc} as files to
-make, rather than source files.
+make, rather than source files.  Create the specified files,
+if they are not already up-to-date.
+(Note that this option also enables @samp{--use-subdirs}.)
 
 @item -r
 @itemx --rebuild
Index: tests/invalid/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/Mmakefile,v
retrieving revision 1.123
diff -u -d -p -r1.123 Mmakefile
--- tests/invalid/Mmakefile	5 Sep 2002 08:15:30 -0000	1.123
+++ tests/invalid/Mmakefile	19 Sep 2002 13:46:58 -0000
@@ -77,7 +77,6 @@ SINGLEMODULE_PROGS= \
 	multisoln_func \
 	nested_impl_in_int \
 	no_exports \
-	nonexistent_import \
 	not_a_switch \
 	nullary_ho_func_error \
 	occurs \
@@ -135,6 +134,18 @@ SINGLEMODULE_PROGS= \
 	vars_in_wrong_places \
 	with_type
 
+# The following tests can only be run when building with --use-subdirs
+# Note that tests which are compiled with --use-subdirs (or --make,
+# which implies --use-subdirs) can only be run if we are building with
+# --use-subdirs, otherwise (1) these tests will create the `Mercury'
+# subdirectory, which will mean that all remaining tests get run with
+# --use-subdirs and (2) if we're testing against a work-space, and the
+# workspace wasn't built with --use-subdirs, these tests will be fail with
+# some misleading error messages, due to the standard library not being
+# in the expected place.
+USE_SUBDIR_MODULES = \
+	nonexistent_import
+
 # XXX we do not yet pass the following tests:
 #	foreign_decl_line_number (due to some errors being reported in .c
 #		files and .mh files rather than in .m files)
@@ -154,7 +165,11 @@ SINGLEMODULE_PROGS= \
 
 #-----------------------------------------------------------------------------#
 
+ifeq($(MMAKE_USE_SUBDIRS),yes)
+PROGS= $(SINGLEMODULE_PROGS) $(MULTIMODULE_PROGS) $(USE_SUBDIR_MODULES)
+else
 PROGS= $(SINGLEMODULE_PROGS) $(MULTIMODULE_PROGS)
+endif
 
 TESTS = $(MULTIMODULE_PROGS) $(SINGLEMODULE_PROGS:%=%-nodepend)
 SUBDIRS = purity

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