Avoid problems with overlong command lines when making mer_std.jar.

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.
This commit is contained in:
Peter Wang
2009-06-01 10:29:01 +00:00
parent ee74813099
commit 41bf5ef5f1
2 changed files with 13 additions and 5 deletions

View File

@@ -272,18 +272,23 @@ java_symlinks:
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) .

View File

@@ -96,4 +96,7 @@ cp ssdb/Mercury.* ${installdir}/ssdb
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