[m-rev.] For review: Get library building to work in grade Java using subdirectories

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 17 11:48:45 AEDT 2004


On 17-Feb-2004, James Goddard <goddardjames at yahoo.com> wrote:
> Get library building to work in grade Java using subdirectories.
> 
> compiler/modules.m:
> 	Jar files were previously being built with incorrect directory
> 	structures if --use-subdirs was turned on.  This patch corrects the
> 	problem.
...
> +		{ MaybeMkJarSubdir = "\t-mkdir " ++ JarSubdir ++ "\n" },

Actually the .jar file should not be stored in a subdirectory,
because users may need to do things with it.
It should be treated like other library files (*.a, *.so, etc.)
and put in the current directory.

I have committed the following patch to fix that.

Given this, there is no need for the mkdir command.

It would be nice to avoid the dependency on sed, if we could do so easily.
But I don't see any easy way of doing that, so don't worry about it.
Still, it's probably worth adding an XXX comment, e.g. "XXX it would be
nice to avoid this dependency on sed".

Otherwise, that change looks fine.

----------

Estimated hours taken: 0.25
Branches: main

compiler/modules.m:
	Don't put .jar files in a Mercury/jars subdirectory, because
	users may need to do things with it.  Instead, treat them like other
	library files (*.a, *.so, etc.), i.e. put in the current directory.

Index: modules.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.289
diff -u -d -u -r1.289 modules.m
--- modules.m	9 Feb 2004 12:13:28 -0000	1.289
+++ modules.m	17 Feb 2004 00:29:41 -0000
@@ -990,6 +990,7 @@
 			; Ext = ".$A"
 			; Ext = ".so"
 			; Ext = ".$(EXT_FOR_SHARED_LIB)"
+			; Ext = ".jar"
 			; Ext = ".split.a"
 			; Ext = ".split.$A"
 			; Ext = ".split.so"


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