[m-rev.] for review: get java.ssdebug grade installing

Ian MacLarty maclarty at csse.unimelb.edu.au
Mon Sep 14 12:49:42 AEST 2009


Estimated hours taken: 2
Branches: main

Get the java.ssdebug grade installing and compiling hello world.
Note that currently the jars for the java.ssdebug grade are installed in the
same location as the non-ssdebug jars.  That's not a problem for now,
because the standard library currently has the ssdebug transformations
turned off when it's compiled in the ssdebug grade, so the java.ssdebug
jars are the same as the java jars.  Changing it so that the java.ssdebug
jars are installed in a different location requires getting mmc to
adjust the classpath depending on the grade, which doesn't seem worth
it at this stage.

Also note that the interface files for the ssdb, browser and mdbcomp
libraries need to be installed in the ssdebug grade otherwise mmc
complains that it cannot find files like ssdb.m when compiling
a program.  These interface files are currently only installed
when there is an ssdebug grade.

browser/MDB_FLAGS.in:
mdbcomp/MDBCOMP_FLAGS.in:
ssdb/SSDB_FLAGS.in:
    Generate .module_dep files (needed to compile ssdebug transformed
    programs).

browser/Mmakefile:
    Build and install mer_browser.jar.
    Install the interface files when in an ssdebug grade.

browser/browse.m:
    Avoid a determinsim warning.

browser/cterm.m:
browser/declarative_execution.m:
browser/listing.m:
    Get this code compiling in java grades.
    The "if (1 == 1)" before throwing an exception is to avoid
    "unreachable code" errors from the Java compiler.

library/Mmakefile:
    Mention that the ssdebug jars are installed in the
    same spot as the non-ssdebug jars.

mdbcomp/Mmakefile:
    Build and install mer_mdbcomp.jar.
    Install the interface files when in an ssdebug grade.

mdbcomp/rtti_access.m:
    Get this code compiling in Java grades.

scripts/Mercury.config.in:
    Add the ssdb, mdbcomp and browser jars to the classpath.
    If they are not installed they will just be ignored.

ssdb/Mmakefile:
    Build and install mer_ssdb.jar.
    Install the interface files when in an ssdebug grade.

ssdb/ssdb.m:
    Get this code compiling in java grades.
    Flush the output buffers after displaying the prompt so that
    it's always displayed.

Index: browser/MDB_FLAGS.in
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/MDB_FLAGS.in,v
retrieving revision 1.3
diff -u -r1.3 MDB_FLAGS.in
--- browser/MDB_FLAGS.in	24 Oct 2007 09:21:14 -0000	1.3
+++ browser/MDB_FLAGS.in	14 Sep 2009 02:35:23 -0000
@@ -6,6 +6,7 @@
 --no-shlib-linker-use-install-name
 --force-disable-tracing
 --no-ssdb
+--generate-mmc-deps
 -I../library
 -I../mdbcomp
 -I../browser
Index: browser/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/Mmakefile,v
retrieving revision 1.55
diff -u -r1.55 Mmakefile
--- browser/Mmakefile	22 Jun 2009 02:58:56 -0000	1.55
+++ browser/Mmakefile	14 Sep 2009 02:35:23 -0000
@@ -89,7 +89,7 @@
 
 #-----------------------------------------------------------------------------#
 
-JAVACFLAGS = -classpath $(LIBRARY_DIR)
+JAVACFLAGS = -classpath $(LIBRARY_DIR):$(MDBCOMP_DIR)
 
 MTAGS	= $(SCRIPTS_DIR)/mtags
 
@@ -134,7 +134,12 @@
 all:	library $(TAGS_FILE_EXISTS) browse_test declarative_test
 
 .PHONY: library
+
+ifeq ("$(findstring java,$(GRADE))","java")
+library: jars
+else
 library: $(LIBS)
+endif
 
 .PHONY: depend
 depend:	MDB_FLAGS $(DEPENDS)
@@ -210,31 +215,23 @@
 
 #-----------------------------------------------------------------------------#
 
-#
-# Some Java compilers require the Java source files to be put in directories
-# which match their package names.  But the Mercury compiler generates them
-# with the package name prefixed to the file name with a ".", not a "/".
-# So we copy the Java source files to where the Java compiler expects them
-# to be.
-#
-# XXX This is a hack.  We ought to change the Mercury compiler so that it
-# generates the Java files with the right names in the first place.
-#
-
-mdb/%.java: mdb.%.java
-	[ -d mdb ] || mkdir mdb
-	cp $< $@
+JARS = $(BROWSER_LIB_NAME).jar
 
-RENAMED_JAVAS = $($(BROWSER_LIB_NAME).javas:mdb.%.java=mdb/%.java)
-
-RENAMED_CLASSES = $($(BROWSER_LIB_NAME).classes:mdb.%.class=mdb/%.class)
+.PHONY:	jars
+jars:	classes
+	echo jmercury/*.class > $(BROWSER_LIB_NAME).classes
+	$(JAR) $(JAR_CREATE_FLAGS) $(BROWSER_LIB_NAME).jar @$(BROWSER_LIB_NAME).classes
+	$(JAR) i $(BROWSER_LIB_NAME).jar
+	$(RM) $(BROWSER_LIB_NAME).classes
+
+JAVAS = $(wildcard jmercury/*.java)
+
+.PHONY:
+classes: javas
+	$(JAVAC) $(ALL_JAVACFLAGS) $(JAVAS)
 
 .PHONY: javas
-javas: $(RENAMED_JAVAS)
-
-.PHONY: classes
-classes: $(RENAMED_JAVAS)
-	$(JAVAC) $(ALL_JAVACFLAGS) -d $(classes_subdir) $(RENAMED_JAVAS)
+javas: $(BROWSER_LIB_NAME).javas
 
 #-----------------------------------------------------------------------------#
 
@@ -268,7 +265,12 @@
 # Installation targets
 
 .PHONY: install
+ifeq ("$(findstring ssdebug,$(GRADE))","ssdebug")
+# The ssdebug grade requires the interface files.
+install: install_library install_ints
+else
 install: install_library
+endif
 
 .PHONY: install_dirs
 install_dirs:
@@ -277,9 +279,12 @@
 		mkdir -p $(INSTALL_GRADE_MODULE_DIR)
 	[ -d $(INSTALL_MERC_LIB_DIR) ] || mkdir -p $(INSTALL_MERC_LIB_DIR)
 
-ifneq ("$(filter il% java% erlang%,$(GRADE))","")
+ifneq ("$(filter il% erlang%,$(GRADE))","")
+
+# there is no browser in the .NET or Erlang backends
 
-# there is no browser in the .NET, Java, Erlang backends
+.PHONY: install_ints
+install_ints:
 
 .PHONY: install_init
 install_init: 
@@ -287,8 +292,24 @@
 .PHONY: install_library
 install_library:
 
+else ifneq (,$(findstring java,$(GRADE)))
+
+.PHONY: install_ints
+install_ints: lib$(BROWSER_LIB_NAME).install_ints
+
+.PHONY: install_init
+install_init: 
+
+.PHONY: install_library
+install_library: jars
+	mkdir -p $(INSTALL_JAVA_LIBRARY_DIR)
+	cp $(JARS) $(INSTALL_JAVA_LIBRARY_DIR)
+
 else 
 
+.PHONY: install_ints
+install_ints:
+
 .PHONY: install_init
 install_init: $(BROWSER_LIB_NAME).init install_dirs
 	cp `vpath_find $(BROWSER_LIB_NAME).init` $(INSTALL_GRADE_MODULE_DIR)
Index: browser/browse.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/browse.m,v
retrieving revision 1.75
diff -u -r1.75 browse.m
--- browser/browse.m	4 Sep 2009 02:03:38 -0000	1.75
+++ browser/browse.m	14 Sep 2009 02:35:24 -0000
@@ -756,9 +756,11 @@
     Addr = (MR_Integer) Value;
 ").
 
-% The debugger does not yet work on non-C backends, so what we return
-% does not matter.
-get_value_representation(_Value, 0).
+% Java doesn't support converting addresses to integers, so we
+% just return zero.  For other backends the debugger doesn't yet
+% work, so it doesn't matter what we return.
+get_value_representation(_Value, X) :-
+    cc_multi_equal(0, X).
 
 :- pred interpret_format_options(option_table(format_option)::in,
     maybe_error(maybe(portray_format))::out) is det.
Index: browser/cterm.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/cterm.m,v
retrieving revision 1.7
diff -u -r1.7 cterm.m
--- browser/cterm.m	23 Nov 2007 07:34:50 -0000	1.7
+++ browser/cterm.m	14 Sep 2009 02:35:25 -0000
@@ -59,6 +59,10 @@
 :- pragma foreign_export("C", match_with_cterm(in, in, out),
     "ML_BROWSE_match_with_cterm").
 
+% Dummy types form non-C backends.
+:- type cterm ---> cterm.
+:- type cargs ---> cargs.
+
 %---------------------------------------------------------------------------%
 
 % Uncomment these and the unsafe_perform_ios below to debug match_with_cterm
@@ -123,6 +127,13 @@
     Args = Term->MR_term_args;
 ").
 
+:- pragma foreign_proc("Java",
+    cterm_deconstruct(_Term::in, _Functor::out, _Args::out),
+    [will_not_call_mercury, promise_pure],
+"
+    if (1 == 1) throw new Error(\"not supported in java grade\");
+").
+
 :- pragma foreign_proc(c,
     cterm_head_tail(Args::in, Head::out, Tail::out),
     [will_not_call_mercury, promise_pure],
@@ -135,3 +146,11 @@
         SUCCESS_INDICATOR = MR_TRUE;
     }
 ").
+
+:- pragma foreign_proc("Java",
+    cterm_head_tail(_Args::in, _Head::out, _Tail::out),
+    [will_not_call_mercury, promise_pure],
+"
+    if (1 == 1) throw new Error(\"not supported in java grade\");
+").
+
Index: browser/declarative_execution.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/declarative_execution.m,v
retrieving revision 1.63
diff -u -r1.63 declarative_execution.m
--- browser/declarative_execution.m	30 Dec 2007 11:11:05 -0000	1.63
+++ browser/declarative_execution.m	14 Sep 2009 02:35:27 -0000
@@ -516,7 +516,7 @@
 :- pred call_node_bytecode_layout(label_layout::in, proc_layout::out)
     is semidet.
 
-    % Default version for non-C backends.
+    % Default version for backends other than C or Java.
 call_node_bytecode_layout(_, _) :-
     semidet_fail.
 
@@ -538,10 +538,17 @@
     }
 ").
 
+:- pragma foreign_proc("Java",
+    call_node_bytecode_layout(_CallLabelLayout::in, _ProcLayout::out),
+    [will_not_call_mercury, thread_safe, promise_pure],
+"
+    if (1 == 1) throw new Error(\"not supported in java grade\");
+").
+
 :- semipure pred have_cached_proc_defn_rep(proc_layout::in, proc_defn_rep::out)
     is semidet.
 
-    % Default version for non-C backends.
+    % Default version for backends other than C or Java.
 have_cached_proc_defn_rep(_, _) :-
     semidet_fail.
 
@@ -563,6 +570,13 @@
     }
 ").
 
+:- pragma foreign_proc("Java",
+    have_cached_proc_defn_rep(_ProcLayout::in, _ProcDefnRep::out),
+    [will_not_call_mercury, thread_safe, promise_semipure],
+"
+    if (1 == 1) throw new Error(\"not supported in java grade\");
+").
+
 :- impure pred cache_proc_defn_rep(proc_layout::in, proc_defn_rep::in) is det.
 
     % Default version for non-C backends.
Index: browser/listing.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/listing.m,v
retrieving revision 1.11
diff -u -r1.11 listing.m
--- browser/listing.m	16 Nov 2007 01:19:46 -0000	1.11
+++ browser/listing.m	14 Sep 2009 02:35:29 -0000
@@ -94,6 +94,8 @@
 :- type search_path  == list(path_name).
 
 :- pragma foreign_type("C", c_file_ptr, "FILE *", [can_pass_as_mercury_type]).
+    % stub.
+:- pragma foreign_type("Java", c_file_ptr, "java.lang.Object").
 
     % These predicates are called from trace/mercury_trace_internal.c.
     %
Index: library/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.164
diff -u -r1.164 Mmakefile
--- library/Mmakefile	3 Sep 2009 05:04:16 -0000	1.164
+++ library/Mmakefile	14 Sep 2009 02:35:31 -0000
@@ -533,7 +533,10 @@
 
 # Copy the jars and NATIVE_SO to INSTALL_JAVA_LIBRARY_DIR.  Ignore the exit
 # status of last command, since NATIVE_SO may not be available and is not
-# essential.
+# essential.  Note that in the java.ssdebug grade the library will still
+# be copied to INSTALL_JAVA_LIBRARY_DIR.  That's okay for now, because
+# we turn off the ssdebug transformations for the library, so it is equivalent
+# to the non-ssdebug grade.
 
 .PHONY: install_library
 install_library: jars
Index: mdbcomp/MDBCOMP_FLAGS.in
===================================================================
RCS file: /home/mercury1/repository/mercury/mdbcomp/MDBCOMP_FLAGS.in,v
retrieving revision 1.3
diff -u -r1.3 MDBCOMP_FLAGS.in
--- mdbcomp/MDBCOMP_FLAGS.in	24 Oct 2007 09:21:16 -0000	1.3
+++ mdbcomp/MDBCOMP_FLAGS.in	14 Sep 2009 02:35:31 -0000
@@ -3,6 +3,7 @@
 --halt-at-warn
 --no-warn-inferred-erroneous
 --no-mercury-stdlib-dir
+--generate-mmc-deps
 --no-ssdb
 --no-shlib-linker-use-install-name
 -I../library
Index: mdbcomp/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/mdbcomp/Mmakefile,v
retrieving revision 1.13
diff -u -r1.13 Mmakefile
--- mdbcomp/Mmakefile	3 Oct 2007 12:11:56 -0000	1.13
+++ mdbcomp/Mmakefile	14 Sep 2009 02:35:31 -0000
@@ -120,7 +120,12 @@
 all:	library all-ints $(TAGS_FILE_EXISTS)
 
 .PHONY: library
+
+ifeq ("$(findstring java,$(GRADE))","java")
+library: jars
+else
 library: $(LIBS)
+endif
 
 .PHONY: all-ints
 all-ints: $(MDBCOMP_LIB_NAME).int3s $(MDBCOMP_LIB_NAME).ints
@@ -174,31 +179,23 @@
 
 #-----------------------------------------------------------------------------#
 
-#
-# Some Java compilers require the Java source files to be put in directories
-# which match their package names.  But the Mercury compiler generates them
-# with the package name prefixed to the file name with a ".", not a "/".
-# So we copy the Java source files to where the Java compiler expects them
-# to be.
-#
-# XXX This is a hack.  We ought to change the Mercury compiler so that it
-# generates the Java files with the right names in the first place.
-#
-
-mdbcomp/%.java: mdbcomp.%.java
-	[ -d mdbcomp ] || mkdir mdbcomp
-	cp $< $@
+JARS = $(MDBCOMP_LIB_NAME).jar
 
-RENAMED_JAVAS = $($(MDBCOMP_LIB_NAME).javas:mdbcomp.%.java=mdbcomp/%.java)
-
-RENAMED_CLASSES = $($(MDBCOMP_LIB_NAME).classes:mdbcomp.%.class=mdbcomp/%.class)
+.PHONY:	jars
+jars:	classes
+	echo jmercury/*.class > $(MDBCOMP_LIB_NAME).classes
+	$(JAR) $(JAR_CREATE_FLAGS) $(MDBCOMP_LIB_NAME).jar @$(MDBCOMP_LIB_NAME).classes
+	$(JAR) i $(MDBCOMP_LIB_NAME).jar
+	$(RM) $(MDBCOMP_LIB_NAME).classes
+
+JAVAS = $(wildcard jmercury/*.java)
+
+.PHONY:
+classes: javas
+	$(JAVAC) $(ALL_JAVACFLAGS) $(JAVAS)
 
 .PHONY: javas
-javas: $(RENAMED_JAVAS)
-
-.PHONY: classes
-classes: $(RENAMED_JAVAS)
-	$(JAVAC) $(ALL_JAVACFLAGS) -d $(classes_subdir) $(RENAMED_JAVAS)
+javas: $(MDBCOMP_LIB_NAME).javas
 
 #-----------------------------------------------------------------------------#
 
@@ -232,7 +229,13 @@
 # Installation targets
 
 .PHONY: install
+
+# The ssdebug grade requires the interface files.
+ifeq ("$(findstring ssdebug,$(GRADE))","ssdebug")
+install: install_library install_ints
+else
 install: install_library
+endif
 
 .PHONY: install_dirs
 install_dirs:
@@ -241,9 +244,12 @@
 		mkdir -p $(INSTALL_GRADE_MODULE_DIR)
 	[ -d $(INSTALL_MERC_LIB_DIR) ] || mkdir -p $(INSTALL_MERC_LIB_DIR)
 
-ifneq ("$(filter il% java% erlang%,$(GRADE))","")
+ifneq ("$(filter il% erlang%,$(GRADE))","")
+
+# there is no debugger in the .NET or Erlang backends
 
-# there is no debugger in the .NET, Java, Erlang backends
+.PHONY: install_ints
+install_ints: 
 
 .PHONY: install_init
 install_init: 
@@ -251,7 +257,23 @@
 .PHONY: install_library
 install_library:
 
-else 
+else ifneq (,$(findstring java,$(GRADE)))
+
+.PHONY: install_ints
+install_ints: lib$(MDBCOMP_LIB_NAME).install_ints
+
+.PHONY: install_init
+install_init: 
+
+.PHONY: install_library
+install_library: jars
+	mkdir -p $(INSTALL_JAVA_LIBRARY_DIR)
+	cp $(JARS) $(INSTALL_JAVA_LIBRARY_DIR)
+
+else
+
+.PHONY: install_ints
+install_ints: 
 
 .PHONY: install_init
 install_init: $(MDBCOMP_LIB_NAME).init install_dirs
Index: mdbcomp/rtti_access.m
===================================================================
RCS file: /home/mercury1/repository/mercury/mdbcomp/rtti_access.m,v
retrieving revision 1.12
diff -u -r1.12 rtti_access.m
--- mdbcomp/rtti_access.m	12 Nov 2007 03:52:48 -0000	1.12
+++ mdbcomp/rtti_access.m	14 Sep 2009 02:35:32 -0000
@@ -546,6 +546,13 @@
 #endif
 ").
 
+:- pragma foreign_proc("Java",
+    proc_bytecode_bytes(_ProcLayout::in) = (_ByteCodeBytes::out),
+    [will_not_call_mercury, thread_safe, promise_pure],
+"
+    if (1 == 1) throw new Error(\"not supported in java grade\");
+").
+
     % Default version for non-C backends.
 proc_bytecode_bytes(_) = dummy_bytecode_bytes.
 
Index: scripts/Mercury.config.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mercury.config.in,v
retrieving revision 1.22
diff -u -r1.22 Mercury.config.in
--- scripts/Mercury.config.in	18 Aug 2009 05:10:40 -0000	1.22
+++ scripts/Mercury.config.in	14 Sep 2009 02:35:32 -0000
@@ -69,6 +69,9 @@
 		--c-flag-to-name-object-file "@OBJFILE_OPT@" \
 		--java-classpath "$(INSTALL_JAVA_LIBRARY_DIR)/$(RT_LIB_NAME).jar" \
 		--java-classpath "$(INSTALL_JAVA_LIBRARY_DIR)/$(STD_LIB_NAME).jar" \
+		--java-classpath "$(INSTALL_JAVA_LIBRARY_DIR)/mer_mdbcomp.jar" \
+		--java-classpath "$(INSTALL_JAVA_LIBRARY_DIR)/mer_browser.jar" \
+		--java-classpath "$(INSTALL_JAVA_LIBRARY_DIR)/mer_ssdb.jar" \
 		--java-flags "@JAVAC_FLAGS_FOR_HEAP_SIZE@" \
 		--object-file-extension ". at OBJ_SUFFIX@" \
 		--pic-object-file-extension ". at EXT_FOR_PIC_OBJECTS@" \
Index: ssdb/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/ssdb/Mmakefile,v
retrieving revision 1.4
diff -u -r1.4 Mmakefile
--- ssdb/Mmakefile	22 Jun 2009 02:58:56 -0000	1.4
+++ ssdb/Mmakefile	14 Sep 2009 02:35:32 -0000
@@ -89,7 +89,7 @@
 
 #-----------------------------------------------------------------------------#
 
-JAVACFLAGS = -classpath $(LIBRARY_DIR)
+JAVACFLAGS = -classpath $(LIBRARY_DIR):$(MDBCOMP_DIR):$(BROWSER_DIR)
 
 MTAGS	= $(SCRIPTS_DIR)/mtags
 
@@ -134,7 +134,11 @@
 all:	library $(TAGS_FILE_EXISTS) browse_test declarative_test
 
 .PHONY: library
+ifeq ("$(findstring java,$(GRADE))","java")
+library: jars
+else
 library: $(LIBS)
+endif
 
 .PHONY: depend
 depend:	SSDB_FLAGS $(DEPENDS)
@@ -210,31 +214,22 @@
 
 #-----------------------------------------------------------------------------#
 
-#
-# Some Java compilers require the Java source files to be put in directories
-# which match their package names.  But the Mercury compiler generates them
-# with the package name prefixed to the file name with a ".", not a "/".
-# So we copy the Java source files to where the Java compiler expects them
-# to be.
-#
-# XXX This is a hack.  We ought to change the Mercury compiler so that it
-# generates the Java files with the right names in the first place.
-#
-
-mdb/%.java: mdb.%.java
-	[ -d mdb ] || mkdir mdb
-	cp $< $@
-
-RENAMED_JAVAS = $($(SSDB_LIB_NAME).javas:mdb.%.java=mdb/%.java)
-
-RENAMED_CLASSES = $($(SSDB_LIB_NAME).classes:mdb.%.class=mdb/%.class)
-
-.PHONY: javas
-javas: $(RENAMED_JAVAS)
-
-.PHONY: classes
-classes: $(RENAMED_JAVAS)
-	$(JAVAC) $(ALL_JAVACFLAGS) -d $(classes_subdir) $(RENAMED_JAVAS)
+JARS = $(SSDB_LIB_NAME).jar
+
+.PHONY:	jars
+jars:	classes
+	echo jmercury/*.class > $(SSDB_LIB_NAME).classes
+	$(JAR) $(JAR_CREATE_FLAGS) $(SSDB_LIB_NAME).jar @$(SSDB_LIB_NAME).classes
+	$(JAR) i $(SSDB_LIB_NAME).jar
+	$(RM) $(SSDB_LIB_NAME).classes
+
+JAVAS = $(wildcard jmercury/*.java)
+
+.PHONY:
+classes: javas
+	$(JAVAC) $(ALL_JAVACFLAGS) $(JAVAS)
+
+javas: $(SSDB_LIB_NAME).javas
 
 #-----------------------------------------------------------------------------#
 
@@ -268,7 +263,7 @@
 # Installation targets
 
 .PHONY: install
-install: install_ints install_hdrs install_library
+install: install_library install_ints install_hdrs 
 
 .PHONY: install_dirs
 install_dirs:
@@ -277,9 +272,9 @@
 		mkdir -p $(INSTALL_GRADE_MODULE_DIR)
 	[ -d $(INSTALL_MERC_LIB_DIR) ] || mkdir -p $(INSTALL_MERC_LIB_DIR)
 
-ifneq ("$(filter il% java% erlang%,$(GRADE))","")
+ifneq ("$(filter il% erlang%,$(GRADE))","")
 
-# there is no ssdb (YET!) in the .NET, Java, Erlang backends
+# there is no ssdb in the .NET or Erlang backends
 
 .PHONY: install_ints
 install_ints:
@@ -293,6 +288,22 @@
 .PHONY: install_library
 install_library:
 
+else ifneq (,$(findstring java,$(GRADE)))
+
+.PHONY: install_ints
+install_ints: lib$(SSDB_LIB_NAME).install_ints
+
+.PHONY: install_init
+install_init: 
+
+.PHONY: install_hdrs
+install_hdrs: lib$(SSDB_LIB_NAME).install_hdrs
+
+.PHONY: install_library
+install_library: jars
+	mkdir -p $(INSTALL_JAVA_LIBRARY_DIR)
+	cp $(JARS) $(INSTALL_JAVA_LIBRARY_DIR)
+
 else 
 
 .PHONY: install_ints
Index: ssdb/SSDB_FLAGS.in
===================================================================
RCS file: /home/mercury1/repository/mercury/ssdb/SSDB_FLAGS.in,v
retrieving revision 1.3
diff -u -r1.3 SSDB_FLAGS.in
--- ssdb/SSDB_FLAGS.in	10 Dec 2007 07:55:01 -0000	1.3
+++ ssdb/SSDB_FLAGS.in	14 Sep 2009 02:35:32 -0000
@@ -6,6 +6,7 @@
 --no-shlib-linker-use-install-name
 --force-disable-tracing
 --no-ssdb
+--generate-mmc-deps
 -I../library
 -I../mdbcomp
 -I../browser
Index: ssdb/ssdb.m
===================================================================
RCS file: /home/mercury1/repository/mercury/ssdb/ssdb.m,v
retrieving revision 1.15
diff -u -r1.15 ssdb.m
--- ssdb/ssdb.m	23 Dec 2007 23:42:35 -0000	1.15
+++ ssdb/ssdb.m	14 Sep 2009 02:35:33 -0000
@@ -953,6 +953,7 @@
 read_and_execute_cmd(Event, ShadowStack, Depth, WhatNext, !IO) :-
     % XXX use stdout_stream
     io.write_string("ssdb> ", !IO),
+    io.flush_output(!IO),
     % Read a string in input and return a string.
     io.read_line_as_string(io.stdin_stream, Result, !IO),
     (
@@ -1715,6 +1716,13 @@
     IO = IO0;
 ").
 
+:- pragma foreign_proc("Java",
+    exit_debugger(_IO0::di, _IO::uo),
+    [will_not_call_mercury, promise_pure, tabled_for_io],
+"
+    System.exit(0);
+").
+
 %----------------------------------------------------------------------------%
 
     % Print the current informations at this event point.
--------------------------------------------------------------------------
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