[m-rev.] Diff: bug fix for generating .dv file in grade Java

James Goddard goddardjames at yahoo.com
Mon Feb 16 11:43:04 AEDT 2004


Estimated hours taken: 1
Branches: main

Bug fix for building dv file in grade Java.

compiler/modules.m:
	Fix a bug in generate_dv_file/6 where pattern matching was being
	used incorrectly to list .class files of inner modules in Java.


Index: modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.291
diff -u -d -r1.291 modules.m
--- modules.m	16 Feb 2004 00:38:43 -0000	1.291
+++ modules.m	16 Feb 2004 00:41:53 -0000
@@ -4408,9 +4408,13 @@
 	% within the original .java file.  The filenames of all
 	% these can be matched with `module\$*.class', hence the
 	% "\\$$*.class" below.
+	% If no such files exist, Make will use the pattern verbatim,
+	% so we enclose the pattern in a `wildcard' function to prevent this.
+	% XXX This relies on GNU Make.
+	io__write_string(DepStream, "$(wildcard "),
 	write_compact_dependencies_list(Modules, "$(classes_subdir)",
 					"\\$$*.class", Basis, DepStream),
-	io__write_string(DepStream, "\n"),
+	io__write_string(DepStream, ")\n"),
 
 	io__write_string(DepStream, MakeVarName),
 	io__write_string(DepStream, ".dirs = "),
--------------------------------------------------------------------------
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