[m-rev.] diff: java mmake fixes

Peter Wang novalazy at gmail.com
Mon Jun 1 20:32:31 AEST 2009


Branches: main

library/Mmakefile:
	Avoid problems with overlong command lines when making mer_std.jar.

	Call `jar i' to add indices for jar files.

scripts/prepare_install_dir.in:
	Make a copy of the java/runtime directory for the java grade.

Index: library/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.157
diff -u -r1.157 Mmakefile
--- library/Mmakefile	22 May 2009 02:51:21 -0000	1.157
+++ library/Mmakefile	1 Jun 2009 10:26:18 -0000
@@ -272,18 +272,23 @@
 
 JARS = $(STD_LIB_NAME).jar $(RT_LIB_NAME).jar
 
+# We list the classes in a temporary file to avoid overlong command lines.
 # We ignore the exit status of the last two commands because NATIVE_SO is not
 # an essential part of the Mercury standard library for the Java
 # implementation.  Users should be able to run programs in grade Java without
 # any architecture-specific objects.
 .PHONY:	jars
 jars:	classes
-	$(JAR) $(JAR_CREATE_FLAGS) $(STD_LIB_NAME).jar mercury/*.class \
-		mercury/bit_buffer_/*.class \
-		mercury/stream_/*.class \
-		mercury/string_/*.class \
-		mercury/thread_/*.class
+	echo mercury/*.class > $(STD_LIB_NAME).classes
+	echo mercury/bit_buffer_/*.class >> $(STD_LIB_NAME).classes
+	echo mercury/stream_/*.class >> $(STD_LIB_NAME).classes
+	echo mercury/string_/*.class >> $(STD_LIB_NAME).classes
+	echo mercury/thread_/*.class >> $(STD_LIB_NAME).classes
+	$(JAR) $(JAR_CREATE_FLAGS) $(STD_LIB_NAME).jar @$(STD_LIB_NAME).classes
+	$(JAR) i $(STD_LIB_NAME).jar
+	$(RM) $(STD_LIB_NAME).classes
 	$(JAR) $(JAR_CREATE_FLAGS) $(RT_LIB_NAME).jar mercury/runtime/*.class
+	$(JAR) i $(RT_LIB_NAME).jar
 	-+cd mercury/runtime && mmake $(NATIVE_SO)
 	-cp mercury/runtime/$(NATIVE_SO) .
 
Index: scripts/prepare_install_dir.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/prepare_install_dir.in,v
retrieving revision 1.1
diff -u -r1.1 prepare_install_dir.in
--- scripts/prepare_install_dir.in	25 Feb 2008 07:21:21 -0000	1.1
+++ scripts/prepare_install_dir.in	1 Jun 2009 10:26:18 -0000
@@ -96,4 +96,7 @@
 cp ssdb/.mgnuc* ${installdir}/ssdb
 cp ssdb/*FLAGS* ${installdir}/ssdb
 cp ssdb/*.m ${installdir}/ssdb
+mkdir ${installdir}/java
+mkdir ${installdir}/java/runtime
+cp java/runtime/*.java ${installdir}/java/runtime
 exit 0


--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list