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 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 # 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 # an essential part of the Mercury standard library for the Java
# implementation. Users should be able to run programs in grade Java without # implementation. Users should be able to run programs in grade Java without
# any architecture-specific objects. # any architecture-specific objects.
.PHONY: jars .PHONY: jars
jars: classes jars: classes
$(JAR) $(JAR_CREATE_FLAGS) $(STD_LIB_NAME).jar mercury/*.class \ echo mercury/*.class > $(STD_LIB_NAME).classes
mercury/bit_buffer_/*.class \ echo mercury/bit_buffer_/*.class >> $(STD_LIB_NAME).classes
mercury/stream_/*.class \ echo mercury/stream_/*.class >> $(STD_LIB_NAME).classes
mercury/string_/*.class \ echo mercury/string_/*.class >> $(STD_LIB_NAME).classes
mercury/thread_/*.class 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) $(JAR_CREATE_FLAGS) $(RT_LIB_NAME).jar mercury/runtime/*.class
$(JAR) i $(RT_LIB_NAME).jar
-+cd mercury/runtime && mmake $(NATIVE_SO) -+cd mercury/runtime && mmake $(NATIVE_SO)
-cp mercury/runtime/$(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/.mgnuc* ${installdir}/ssdb
cp ssdb/*FLAGS* ${installdir}/ssdb cp ssdb/*FLAGS* ${installdir}/ssdb
cp ssdb/*.m ${installdir}/ssdb cp ssdb/*.m ${installdir}/ssdb
mkdir ${installdir}/java
mkdir ${installdir}/java/runtime
cp java/runtime/*.java ${installdir}/java/runtime
exit 0 exit 0