* Make-lang.in: (java.install-common) Add
authormembar <membar@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 24 Nov 2003 15:14:23 +0000 (15:14 +0000)
committermembar <membar@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 24 Nov 2003 15:14:23 +0000 (15:14 +0000)
symlink for $(target_noncanonical)-gcjh for
native builds.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73875 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/Make-lang.in

index 5155450..4c7afae 100644 (file)
@@ -1,3 +1,9 @@
+2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
+
+       * Make-lang.in: (java.install-common) Add
+       symlink for $(target_noncanonical)-gcjh for
+       native builds.
+
 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
 
        * Make-lang.in (java.extraclean): Delete.
index 56a5fd5..e7a5bae 100644 (file)
@@ -43,6 +43,7 @@
 # Actual names to use when installing a native compiler.
 JAVA_INSTALL_NAME = `echo gcj|sed '$(program_transform_name)'`
 JAVA_TARGET_INSTALL_NAME = $(target_noncanonical)-`echo gcj|sed '$(program_transform_name)'`
+GCJH_TARGET_INSTALL_NAME = $(target_noncanonical)-`echo gcjh|sed '$(program_transform_name)'`
 
 # Actual names to use when installing a cross-compiler.
 JAVA_CROSS_NAME = `echo gcj|sed '$(program_transform_cross_name)'`
@@ -179,6 +180,11 @@ check-java :
 # Nothing to do here.
 java.install-normal:
 
+# Install gcj as well as the target-independent tools.
+# For a native build, we special-case gcjh and also install
+# its explicitly-prefixed variant. This allows us to write
+# portable makefiles for both cross builds (where gcjh *must*
+# be explicitly prefixed) and native builds.
 java.install-common: installdirs
        -if [ -f $(GCJ)$(exeext) ]; then \
          if [ -f $(GCJ)-cross$(exeext) ]; then \
@@ -200,6 +206,11 @@ java.install-common: installdirs
            rm -f $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
            $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
            chmod a+x $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
+           if [ $$tool = gcjh ]; then \
+             rm -f $(DESTDIR)$(bindir)/$(GCJH_TARGET_INSTALL_NAME)$(exeext); \
+             ( cd $(DESTDIR)$(bindir) && \
+               $(LN) $$tool_transformed_name$(exeext) $(GCJH_TARGET_INSTALL_NAME)$(exeext) ); \
+           fi; \
           fi ; \
        done