[m-rev.] diff: install Java archives for the exectuables in the Mercury system

Julien Fischer jfischer at opturion.com
Thu Sep 3 20:52:09 AEST 2015


Install Java archives for the executables in the Mercury system.

If the compiler and (most of) the other tools are built in the Java grade then
have the install target also install the Java archives for the executables.

compiler/Mmakefile:
deep_profiler/Mmakefile:
mfilterjavac/Mmakefile:
profiler/Mmakefile:
slice/Mmakefile:
 	As above.  (The ones for the deep profiling tools are are probably
 	a bit useless in practice, but the others should all work.)

Julien.

diff --git a/compiler/Mmakefile b/compiler/Mmakefile
index 26b0539..9b00027 100644
--- a/compiler/Mmakefile
+++ b/compiler/Mmakefile
@@ -264,5 +264,8 @@ install_dirs:
  .PHONY: install_compiler
  install_compiler: mercury_compile install_dirs
  	cp `vpath_find mercury_compile$(EXT_FOR_EXE)` $(INSTALL_MERC_BIN_DIR)
+ifeq ($(findstring java,$(GRADE)),java)
+	cp `vpath_find top_level.jar` $(INSTALL_MERC_BIN_DIR)
+endif

  #-----------------------------------------------------------------------------#
diff --git a/deep_profiler/Mmakefile b/deep_profiler/Mmakefile
index 2a2119e..7837cf1 100644
--- a/deep_profiler/Mmakefile
+++ b/deep_profiler/Mmakefile
@@ -286,6 +286,14 @@ install_cgi_progs: mdprof_cgi mdprof_dump mdprof_test \
  		$(INSTALL_MERC_BIN_DIR)/mdprof_create_feedback
  	cp `vpath_find mdprof_report_feedback$(EXT_FOR_EXE)` \
  		$(INSTALL_MERC_BIN_DIR)/mdprof_report_feedback
+ifeq ($(findstring java,$(GRADE)),java)
+	cp `vpath_find mdprof_cgi.jar` $(INSTALL_MERC_BIN_DIR)
+	cp `vpath_find mdprof_create_feedback.jar` $(INSTALL_MERC_BIN_DIR)
+	cp `vpath_find mdprof_dump.jar` $(INSTALL_MERC_BIN_DIR)
+	cp `vpath_find mdprof_procrep.jar` $(INSTALL_MERC_BIN_DIR)
+	cp `vpath_find mdprof_report_feedback.jar` $(INSTALL_MERC_BIN_DIR)
+	cp `vpath_find mdprof_test.jar` $(INSTALL_MERC_BIN_DIR)
+endif

  uninstall:
  	# We try to uninstall mdprof_cgi, but failure to do so is not an
diff --git a/mfilterjavac/Mmakefile b/mfilterjavac/Mmakefile
index 84459f0..01122af 100644
--- a/mfilterjavac/Mmakefile
+++ b/mfilterjavac/Mmakefile
@@ -140,5 +140,8 @@ install: mfilterjavac
  	-[ -d $(INSTALL_MERC_BIN_DIR) ] || mkdir -p $(INSTALL_MERC_BIN_DIR)
  	cp `vpath_find mfilterjavac$(EXT_FOR_EXE)` \
  		$(INSTALL_MERC_BIN_DIR)/mfilterjavac$(EXT_FOR_EXE)
+ifeq ($(findstring java,$(GRADE)),java)
+	cp `vpath_find mfilterjavac.jar` $(INSTALL_MERC_BIN_DIR)
+endif

  #-----------------------------------------------------------------------------#
diff --git a/profiler/Mmakefile b/profiler/Mmakefile
index bef270b..1f3d987 100644
--- a/profiler/Mmakefile
+++ b/profiler/Mmakefile
@@ -115,5 +115,8 @@ install: install_profiler
  install_profiler: mercury_profile
  	-[ -d $(INSTALL_MERC_BIN_DIR) ] || mkdir -p $(INSTALL_MERC_BIN_DIR)
  	cp `vpath_find mercury_profile$(EXT_FOR_EXE)` $(INSTALL_MERC_BIN_DIR)
+ifeq ($(findstring java,$(GRADE)),java)
+	cp `vpath_find mercury_profile.jar` $(INSTALL_MERC_BIN_DIR)
+endif

  #-----------------------------------------------------------------------------#
diff --git a/slice/Mmakefile b/slice/Mmakefile
index 18c3158..9599450 100644
--- a/slice/Mmakefile
+++ b/slice/Mmakefile
@@ -213,5 +213,12 @@ install_slicer: mslice mdice mtc_union mcov mtc_diff
  		$(INSTALL_MERC_BIN_DIR)/mcov$(EXT_FOR_EXE)
  	cp `vpath_find mtc_diff$(EXT_FOR_EXE)` \
  		$(INSTALL_MERC_BIN_DIR)/mtc_diff$(EXT_FOR_EXE)
+ifeq ($(findstring java,$(GRADE)),java)
+	cp `vpath_find mcov.jar` $(INSTALL_MERC_BIN_DIR)
+	cp `vpath_find mdice.jar` $(INSTALL_MERC_BIN_DIR)
+	cp `vpath_find mslice.jar` $(INSTALL_MERC_BIN_DIR)
+	cp `vpath_find mtc_diff.jar` $(INSTALL_MERC_BIN_DIR)
+	cp `vpath_find mtc_union.jar` $(INSTALL_MERC_BIN_DIR)
+endif

  #-----------------------------------------------------------------------------#



More information about the reviews mailing list