[m-rev.] trivial: diff fix library/Mmakefile for java grade

Julien Fischer juliensf at cs.mu.OZ.AU
Tue May 3 13:53:15 AEST 2005

Estimated hours taken: 0.1
Branches: main, release

	When compiling in grade java, mangle the filename of the
	enum module correctly.  (enum is a keyword in Java 1.5).


Index: Mmakefile
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.140
diff -u -r1.140 Mmakefile
--- Mmakefile	17 Feb 2005 06:38:53 -0000	1.140
+++ Mmakefile	3 May 2005 03:02:45 -0000
@@ -238,13 +238,15 @@

 # The names `int', `float', and `char' can't be used as class names,
 # because they are Java keywords.  So we use `mr_int', `mr_float', and
-# `mr_char' instead.  Since Java implementations often assume that
+# `mr_char' instead.  `enum' is also a keyword in Java 1.5, so we
+# likewise use `mr_enum'.  Since Java implementations often assume that
 # a class foo is located in a file foo.java, we similarly mangle the
 # Java file names for these standard library modules.
 JAVAS = ` echo $($(STD_LIB_NAME).javas) | sed \
 		-e 's/ int.java/ mr_int.java/' \
 		-e 's/ float.java/ mr_float.java/' \
-		-e 's/ char.java/ mr_char.java/' `
+		-e 's/ char.java/ mr_char.java/' \
+		-e 's/ enum.java/ mr_enum.java/' `

 # We need to invoke javac on all of the classes at the same time,
 # rather than compiling them separately.  This is needed because

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