[m-rev.] diff: Fix and enable the mfilterjavac option

Paul Bone paul at bone.id.au
Wed Oct 16 19:23:16 AEDT 2013


Branches: main

No review necessary as Julien and I have already been discussing this
change.


Fix and enable the mfilterjavac option

Julien reported a bootstrap problem when mfilterjavac was enabled and a Java
grade was being installed but the installed compiler did not have an
mfilterjavac program.  When installing a Java grade the mfilterjavac program
in the workspace was not in the PATH.  This change ensures that mfilterjavac
is in the path and enables it's use in the compiler.

compiler/options.m:
    Enable the mfilterjavac option.

Mmakefile:
    Set the PATH in SUBDIR_MAKE and SUBSUBDIR_MAKE correctly so that the
    compiler can find mfilterjavac.

tools/bootcheck:
    Run 'mmake depend' in stage2/mfilterjavac in the same way that we do for
    the other directories.

mfilterjavac/.gitignore
    Ignore tags related files in this directory.
---
 Mmakefile               | 18 +++++++++++-------
 compiler/options.m      |  4 +---
 mfilterjavac/.gitignore |  2 ++
 tools/bootcheck         |  2 +-
 4 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/Mmakefile b/Mmakefile
index 025be41..920dc42 100644
--- a/Mmakefile
+++ b/Mmakefile
@@ -50,13 +50,17 @@ SUBDIRS = \
 
 MMAKEFLAGS =
 
-SUBDIR_MMAKE =	PATH=../scripts:../util:$$PATH \
-		MMAKE_VPATH=. \
-		MMAKE_DIR=../scripts \
-		DESTDIR=$(DESTDIR) \
-		../scripts/mmake $(MMAKEFLAGS)
-
-SUBSUBDIR_MMAKE = PATH=../../scripts:../../util:$$PATH \
+# We include ../../mfilterjavac in this path because $SUBDIR_MMAKE is used
+# from the grade install directories, and we need mfilterjavac in our path
+# when executing in install_grade_dir.java/library and others.
+SUBDIR_MMAKE = \
+    PATH=../scripts:../util:../mfilterjavac:../../mfilterjavac:$$PATH \
+    MMAKE_VPATH=. \
+    MMAKE_DIR=../scripts \
+    DESTDIR=$(DESTDIR) \
+    ../scripts/mmake $(MMAKEFLAGS)
+
+SUBSUBDIR_MMAKE = PATH=../../scripts:../../util:../../mfilterjavac:$$PATH \
 		MMAKE_VPATH=. \
 		MMAKE_DIR=../../scripts \
 		DESTDIR=$(DESTDIR) \
diff --git a/compiler/options.m b/compiler/options.m
index 9c53fc7..af4b6d0 100644
--- a/compiler/options.m
+++ b/compiler/options.m
@@ -1840,9 +1840,7 @@ option_defaults_2(link_option, [
     mkinit_erl_command                  -   string("mkinit_erl"),
     demangle_command                    -   string("mdemangle"),
     filtercc_command                    -   string("mfiltercc"),
-    % XXX filterjavac_command is disabled until the addition of
-    % mfilterjavac has bootstrapped.
-    filterjavac_command                 -   string(""),
+    filterjavac_command                 -   string("mfilterjavac"),
     trace_libs                          -   string(""),
     thread_libs                         -   string(""),
     hwloc_libs                          -   string(""),
diff --git a/mfilterjavac/.gitignore b/mfilterjavac/.gitignore
index c84bc9f..82693f9 100644
--- a/mfilterjavac/.gitignore
+++ b/mfilterjavac/.gitignore
@@ -1,5 +1,7 @@
+.mfilterjavac_tags
 MFILTERJAVAC_FLAGS
 mfilterjavac
+tags
 *.c
 *.c_date
 *.d
diff --git a/tools/bootcheck b/tools/bootcheck
index 6002d4a..a33ad1f 100755
--- a/tools/bootcheck
+++ b/tools/bootcheck
@@ -940,7 +940,7 @@ then
         if (cd $stage2dir && \
             $MMAKE $mmake_opts dep_library dep_mdbcomp \
             dep_browser dep_ssdb dep_compiler \
-            dep_slice dep_profiler dep_deep_profiler)
+            dep_slice dep_profiler dep_deep_profiler dep_mfilterjavac)
         then
             echo "building of stage 2 dependencies successful"
         else
-- 
1.8.4.rc3




More information about the reviews mailing list