public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Question on Makefile.in's program_transform_cross_name
@ 2003-12-05 16:54 Kelley Cook
  2003-12-05 17:26 ` Daniel Jacobowitz
  2003-12-05 23:18 ` Kelley Cook
  0 siblings, 2 replies; 4+ messages in thread
From: Kelley Cook @ 2003-12-05 16:54 UTC (permalink / raw)
  To: Nathanael Nerode, gcc

Nathaneal,

As suggested, I was attempting to get rid of the copying of the doc 
directory from source to objdir in the PR12744 patch.  My first attempt 
was just to delete those four lines from my proposed patch which due to 
the $(docobjdir) -> doc/ transformation theoretically should just work.

A make-install from a simulated tarball works great for the .info files, 
but it does not yet work for the man files, since the install-man rules 
were never adjusted to be like the install-info file rules with a 
generic pattern.  Obviously making them similar should fix that problem.

However, I have a question, which I think you can answer.
In the install-man rules there is currently a shelled out

-if [ -f gcc-cross$(exeext) ] ; then \
  rm -f $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
  $(INSTALL_DATA) $(docobjdir)/gcc.1 
$(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
  chmod a-x $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
else \
  rm -f $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
  $(INSTALL_DATA) $(docobjdir)/gcc.1 
$(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
  chmod a-x $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
fi

Now looking look at the definitions of GCC_INSTALL_NAME and 
GCC_CROSS_NAME we get:

GCC_INSTALL_NAME = `echo gcc|sed '$(program_transform_name)'`
GCC_CROSS_NAME = `echo gcc|sed '$(program_transform_cross_name)'`

Continuing to check the definitions of those two $(program...) 
definitions, I see

program_transform_name = @program_transform_name@
program_transform_cross_name = @program_transform_name@

So those are always the same, which consequently means GCC_INSTALL_NAME 
and GCC_CROSS_NAME are always the same which means I could just delete 
the *_CROSS_NAME lines as well as the numerous spots in the makefile 
which differentiate on them.

Is my analysis of the current situation correct and more importantly if 
so should GCC_INSTALL_NAME always be the same as GCC_CROSS_NAME?  I 
think that the answer is yes since configure.in seems to take care of 
adjusting the sed script to prefix the target name.

If it is then I can submit a separate patch for cleaning up *_CROSS_NAME 
the Makefile and */Make-lang.in files.

Thanks,
Kelley Cook

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question on Makefile.in's program_transform_cross_name
  2003-12-05 16:54 Question on Makefile.in's program_transform_cross_name Kelley Cook
@ 2003-12-05 17:26 ` Daniel Jacobowitz
  2003-12-05 23:18 ` Kelley Cook
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-12-05 17:26 UTC (permalink / raw)
  To: Kelley Cook; +Cc: Nathanael Nerode, gcc

On Fri, Dec 05, 2003 at 11:44:59AM -0500, Kelley Cook wrote:
> Now looking look at the definitions of GCC_INSTALL_NAME and 
> GCC_CROSS_NAME we get:
> 
> GCC_INSTALL_NAME = `echo gcc|sed '$(program_transform_name)'`
> GCC_CROSS_NAME = `echo gcc|sed '$(program_transform_cross_name)'`
> 
> Continuing to check the definitions of those two $(program...) 
> definitions, I see
> 
> program_transform_name = @program_transform_name@
> program_transform_cross_name = @program_transform_name@
> 
> So those are always the same, which consequently means GCC_INSTALL_NAME 
> and GCC_CROSS_NAME are always the same which means I could just delete 
> the *_CROSS_NAME lines as well as the numerous spots in the makefile 
> which differentiate on them.
> 
> Is my analysis of the current situation correct and more importantly if 
> so should GCC_INSTALL_NAME always be the same as GCC_CROSS_NAME?  I 
> think that the answer is yes since configure.in seems to take care of 
> adjusting the sed script to prefix the target name.

Once upon a time, these were different.  It was confusing, and people
didn't really like it, so now they're the same.  I suspect you could
remove GCC_CROSS_NAME at this point.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question on Makefile.in's program_transform_cross_name
  2003-12-05 16:54 Question on Makefile.in's program_transform_cross_name Kelley Cook
  2003-12-05 17:26 ` Daniel Jacobowitz
@ 2003-12-05 23:18 ` Kelley Cook
  1 sibling, 0 replies; 4+ messages in thread
From: Kelley Cook @ 2003-12-05 23:18 UTC (permalink / raw)
  To: gcc-patches; +Cc: Nathanael Nerode, gcc, Daniel Jacobowitz

[-- Attachment #1: Type: text/plain, Size: 819 bytes --]

Kelley Cook wrote:

> Is my analysis of the current situation correct and more importantly if 
> so should GCC_INSTALL_NAME always be the same as GCC_CROSS_NAME?  I 
> think that the answer is yes since configure.in seems to take care of 
> adjusting the sed script to prefix the target name.
> 
> If it is then I can submit a separate patch for cleaning up *_CROSS_NAME 
> the Makefile and */Make-lang.in files.
> 

Here is the cleanup patch to accomplish this.
Tested with:
make install on i686-pc-cygwin (native)
make install on i686-pc-cygwin cross to pentium4-pc-cygwin.

Both work as expected, with one unrelated and pre-existing exception 
regarding gcjh.exe getting doubly transformed into 
pentium4-pc-cygwin-pentium4-pc-cygwin-gcjh.exe for which I'll submit a 
new patch for ASAP.

OK to install?
Kelley Cook

[-- Attachment #2: cross_name.patch --]
[-- Type: text/plain, Size: 20629 bytes --]

gcc/
2003-12-05  Kelley Cook  <kcook@gcc.gnu.org>

	* Makefile.in (program_transform_cross_name): Delete.
	(GCC_CROSS_NAME, CPP_CROSS_NAME): Delete.
	(PROTOIZE_CROSS_NAME, UNPROTOIZE_CROSS_NAME): Delete.
	(AR_FOR_TARGET, RANLIB_FOR_TARGET, NM_FOR_TARGET): Adjust for above.
	(install_cpp, install_driver, install-man, uninstall): Likewise.

gcc/cp
2003-12-05  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
	(c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
	(c++.uninstall): Likewise.

gcc/f
2003-12-05  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (G77_CROSS_NAME): Delete.
	(g77.install_common, g77.install-man, g77.uninstall): Adjust for above.

gcc/java
2003-12-05  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (GCJ_CROSS_NAME): Delete.
	(java.install_common, java.install-man): Adjust for above.
	(java.uninstall): Likewise.

diff -rup gcc-orig/gcc/Makefile.in gcc-cross/gcc/Makefile.in
--- gcc-orig/gcc/Makefile.in	2003-12-01 22:55:20.000000000 -0500
+++ gcc-cross/gcc/Makefile.in	2003-12-05 12:35:31.988498200 -0500
@@ -63,7 +63,6 @@ target_noncanonical=@target_noncanonical
 
 # Sed command to transform gcc to installed name.
 program_transform_name = @program_transform_name@
-program_transform_cross_name = @program_transform_name@
 
 # -----------------------------
 # Directories used during build
@@ -301,7 +300,7 @@ AR_FOR_TARGET = ` \
     if [ "$(host)" = "$(target)" ] ; then \
       echo ar; \
     else \
-       t='$(program_transform_cross_name)'; echo ar | sed -e $$t ; \
+       t='$(program_transform_name)'; echo ar | sed -e $$t ; \
     fi; \
   fi`
 AR_FLAGS_FOR_TARGET =
@@ -314,7 +313,7 @@ RANLIB_FOR_TARGET = ` \
     if [ "$(host)" = "$(target)" ] ; then \
       echo $(RANLIB); \
     else \
-       t='$(program_transform_cross_name)'; echo ranlib | sed -e $$t ; \
+       t='$(program_transform_name)'; echo ranlib | sed -e $$t ; \
     fi; \
   fi`
 NM_FOR_TARGET = ` \
@@ -326,7 +325,7 @@ NM_FOR_TARGET = ` \
     if [ "$(host)" = "$(target)" ] ; then \
       echo nm; \
     else \
-       t='$(program_transform_cross_name)'; echo nm | sed -e $$t ; \
+       t='$(program_transform_name)'; echo nm | sed -e $$t ; \
     fi; \
   fi`
 
@@ -602,12 +601,6 @@ UNPROTOIZE_INSTALL_NAME = `echo unprotoi
 GCOV_INSTALL_NAME = `echo gcov|sed '$(program_transform_name)'`
 GCCBUG_INSTALL_NAME = `echo gccbug|sed '$(program_transform_name)'`
 
-# Actual name to use when installing a cross-compiler.
-GCC_CROSS_NAME = `echo gcc|sed '$(program_transform_cross_name)'`
-CPP_CROSS_NAME = `echo cpp|sed '$(program_transform_cross_name)'`
-PROTOIZE_CROSS_NAME = `echo protoize|sed '$(program_transform_cross_name)'`
-UNPROTOIZE_CROSS_NAME = `echo unprotoize|sed '$(program_transform_cross_name)'`
-
 # Setup the testing framework, if you have one
 EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
             echo $${rootme}/../expect/expect ; \
@@ -2865,21 +2858,12 @@ install: install-common $(INSTALL_HEADER
 
 # Handle cpp installation.
 install-cpp: cpp$(exeext)
-	-if [ -f gcc-cross$(exeext) ] ; then \
-	  rm -f $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext); \
-	  $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext); \
-	  if [ x$(cpp_install_dir) != x ]; then \
-	    rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
-	    $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
-	  else true; fi; \
-	else \
-	  rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
-	  $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
-	  if [ x$(cpp_install_dir) != x ]; then \
-	    rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
-	    $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
-	  else true; fi; \
-	fi
+	-rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext)
+	-$(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext)
+	-if [ x$(cpp_install_dir) != x ]; then \
+	  rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
+	  $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
+	else true; fi
 
 # Create the installation directories.
 # $(libdir)/gcc/include isn't currently searched by cpp.
@@ -2922,22 +2906,14 @@ install-common: native $(EXTRA_PARTS) la
 	  chmod a-x $(DESTDIR)$(libsubdir)/specs; \
 	fi
 # Install protoize if it was compiled.
-	-if [ -f protoize$(exeext) ]; \
-	then \
-	    if [ -f gcc-cross$(exeext) ] ; then \
-		rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
-		$(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
-		rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
-		$(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
-	    else \
-		rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
-		$(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
-		rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
-		$(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
-	    fi ; \
-	    rm -f $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
-	    $(INSTALL_DATA) SYSCALLS.c.X $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
-	    chmod a-x $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
+	-if [ -f protoize$(exeext) ]; then \
+	  rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
+	  $(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
+	  rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
+	  $(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
+	  rm -f $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
+	  $(INSTALL_DATA) SYSCALLS.c.X $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
+	  chmod a-x $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
 	fi
 # Install gcov if it was compiled.
 	-if [ -f gcov$(exeext) ]; \
@@ -2951,22 +2927,17 @@ install-common: native $(EXTRA_PARTS) la
 # $(target_noncanonical)-gcc-$(version)
 # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
 install-driver: installdirs xgcc$(exeext)
+	-rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
+	-$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
+	-rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)
+	-( cd $(DESTDIR)$(bindir) && \
+	   $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version) )
 	-if [ -f gcc-cross$(exeext) ] ; then \
-	  rm -f $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \
-	  $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \
-	  rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version); \
-	  ( cd $(DESTDIR)$(bindir) && \
-	    $(LN) $(GCC_CROSS_NAME)$(exeext) $(target_noncanonical)-gcc-$(version) ); \
 	  if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
 	    rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
 	    $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
 	  else true; fi; \
 	else \
-	  rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
-	  $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
-	  rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version); \
-	  ( cd $(DESTDIR)$(bindir) && \
-	    $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version) ); \
 	  rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
 	  ( cd $(DESTDIR)$(bindir) && \
 	    $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \
@@ -3002,15 +2973,9 @@ $(DESTDIR)$(infodir)/%.info: $(docobjdir
 
 # Install the man pages.
 install-man: installdirs $(GENERATED_MANPAGES) lang.install-man
-	-if [ -f gcc-cross$(exeext) ] ; then \
-	  rm -f $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
-	  $(INSTALL_DATA) $(docobjdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
-	  chmod a-x $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
-	else \
-	  rm -f $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
-	  $(INSTALL_DATA) $(docobjdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
-	  chmod a-x $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
-	fi
+	-rm -f $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
+	-$(INSTALL_DATA) $(docobjdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
+	-chmod a-x $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
 	-rm -f $(DESTDIR)$(man1dir)/cpp$(man1ext)
 	-$(INSTALL_DATA) $(docobjdir)/cpp.1 $(DESTDIR)$(man1dir)/cpp$(man1ext)
 	-chmod a-x $(DESTDIR)$(man1dir)/cpp$(man1ext)
@@ -3141,20 +3106,14 @@ uninstall: lang.uninstall
 	-rm -rf $(DESTDIR)$(libsubdir)
 	-rm -rf $(DESTDIR)$(libexecsubdir)
 	-rm -rf $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
-	-rm -rf $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext)
 	-rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext)
-	-rm -f $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext)
 	-if [ x$(cpp_install_dir) != x ]; then \
 	  rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
-	  rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \
 	else true; fi
 	-rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext)
-	-rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext)
 	-rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext)
-	-rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext)
 	-rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
 	-rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
-	-rm -rf $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext)
 	-rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext)
 	-rm -rf $(DESTDIR)$(man1dir)/protoize$(man1ext)
 	-rm -rf $(DESTDIR)$(man1dir)/unprotoize$(man1ext)
diff -rup gcc-orig/gcc/cp/Make-lang.in gcc-cross/gcc/cp/Make-lang.in
--- gcc-orig/gcc/cp/Make-lang.in	2003-11-20 05:08:53.000000000 -0500
+++ gcc-cross/gcc/cp/Make-lang.in	2003-12-05 12:41:37.745371600 -0500
@@ -42,10 +42,6 @@ GXX_INSTALL_NAME = `echo g++|sed '$(prog
 CXX_TARGET_INSTALL_NAME = $(target_noncanonical)-`echo c++|sed '$(program_transform_name)'`
 GXX_TARGET_INSTALL_NAME = $(target_noncanonical)-`echo g++|sed '$(program_transform_name)'`
 
-# Actual names to use when installing a cross-compiler.
-CXX_CROSS_NAME = `echo c++|sed '$(program_transform_cross_name)'`
-GXX_CROSS_NAME = `echo g++|sed '$(program_transform_cross_name)'`
-
 #\f
 # Define the names for selecting c++ in LANGUAGES.
 # Note that it would be nice to move the dependency on g++
@@ -133,14 +129,14 @@ c++.install-normal:
 # Install the driver program as $(target)-g++
 # and also as either g++ (if native) or $(tooldir)/bin/g++.
 c++.install-common: installdirs
+	-rm -f $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext)
+	-$(INSTALL_PROGRAM) g++$(exeext) $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext)
+	-chmod a+x $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext)
+	-rm -f $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext)
+	-( cd $(DESTDIR)$(bindir) && \
+	      $(LN) $(GXX_INSTALL_NAME)$(exeext) $(CXX_INSTALL_NAME)$(exeext) )
 	-if [ -f cc1plus$(exeext) ] ; then \
 	  if [ -f g++-cross$(exeext) ] ; then \
-	    rm -f $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
-	    $(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
-	    chmod a+x $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
-	    rm -f $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext); \
-	    ( cd $(DESTDIR)$(bindir) && \
-	      $(LN) $(GXX_CROSS_NAME)$(exeext) $(CXX_CROSS_NAME)$(exeext) ); \
 	    if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
 	      rm -f $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \
 	      $(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \
@@ -149,12 +145,6 @@ c++.install-common: installdirs
 	        $(LN) g++$(exeext) c++$(exeext) ); \
 	    else true; fi; \
 	  else \
-	    rm -f $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
-	    $(INSTALL_PROGRAM) g++$(exeext) $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
-	    chmod a+x $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
-	    rm -f $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
-	    ( cd $(DESTDIR)$(bindir) && \
-	      $(LN) $(GXX_INSTALL_NAME)$(exeext) $(CXX_INSTALL_NAME)$(exeext) ); \
 	    rm -f $(DESTDIR)$(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \
 	    ( cd $(DESTDIR)$(bindir) && \
 	      $(LN) $(GXX_INSTALL_NAME)$(exeext) $(GXX_TARGET_INSTALL_NAME)$(exeext) ); \
@@ -166,32 +156,19 @@ c++.install-common: installdirs
 
 cp/g++.1:
 	-rm -f $@
-	if [ "$(ALL)" = all.cross ]; then \
-	  echo ".so man1/$(GCC_CROSS_NAME).1" > $@ ; \
-	else \
-	  echo ".so man1/$(GCC_INSTALL_NAME).1" > $@ ; \
-	fi
+	-echo ".so man1/$(GCC_INSTALL_NAME).1" > $@
 
 c++.install-man: installdirs cp/g++.1
 	-if [ -f cc1plus$(exeext) ] ; then \
-	  if [ -f g++-cross$(exeext) ] ; then \
-	    rm -f $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
-	    $(INSTALL_DATA) cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
-	    chmod a-x $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
-	  else \
-	    rm -f $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
-	    $(INSTALL_DATA) cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
-	    chmod a-x $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
-	  fi; \
+	  rm -f $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
+	  $(INSTALL_DATA) cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
+	  chmod a-x $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
 	else true; fi
 
 c++.uninstall:
 	-rm -rf $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext)
-	-rm -rf $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext)
 	-rm -rf $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext)
-	-rm -rf $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext)
 	-rm -rf $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext)
-	-rm -rf $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext)
 #\f
 # Clean hooks:
 # A lot of the ancillary files are deleted by the main makefile.
diff -rup gcc-orig/gcc/f/Make-lang.in gcc-cross/gcc/f/Make-lang.in
--- gcc-orig/gcc/f/Make-lang.in	2003-11-30 06:29:56.000000000 -0500
+++ gcc-cross/gcc/f/Make-lang.in	2003-12-05 12:42:58.784324000 -0500
@@ -40,9 +40,6 @@
 # Actual name to use when installing a native compiler.
 G77_INSTALL_NAME = `echo g77|sed '$(program_transform_name)'`
 
-# Actual name to use when installing a cross-compiler.
-G77_CROSS_NAME = `echo g77|sed '$(program_transform_cross_name)'`
-
 # Some versions of `touch' (such as the version on Solaris 2.8) 
 # do not correctly set the timestamp due to buggy versions of `utime'
 # in the kernel.  So, we use `echo' instead. 
@@ -252,15 +249,9 @@ f77.install-normal:
 # and also as either g77 (if native) or $(tooldir)/bin/g77.
 f77.install-common: installdirs
 	-if [ -f f771$(exeext) ] ; then \
-	  if [ -f g77-cross$(exeext) ] ; then \
-	    rm -f $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
-	    $(INSTALL_PROGRAM) g77-cross$(exeext) $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
-	    chmod a+x $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
-	  else \
-	    rm -f $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
-	    $(INSTALL_PROGRAM) g77$(exeext) $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
-	    chmod a+x $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
-	  fi ; \
+	  rm -f $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
+	  $(INSTALL_PROGRAM) g77$(exeext) $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
+	  chmod a+x $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
 	else true; fi
 	@if [ -f f77-install-ok -o -f $(srcdir)/f77-install-ok ]; then \
 	  echo ''; \
@@ -276,15 +267,9 @@ install-info:: $(DESTDIR)$(infodir)/g77.
 
 f77.install-man: $(GENERATED_MANPAGES) installdirs
 	-if [ -f f771$(exeext) ] ; then \
-	  if [ -f g77-cross$(exeext) ] ; then \
-	    rm -f $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
-	    $(INSTALL_DATA) $(docobjdir)/g77.1 $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
-	    chmod a-x $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
-	  else \
-	    rm -f $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
-	    $(INSTALL_DATA) $(docobjdir)/g77.1 $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
-	    chmod a-x $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
-	  fi; \
+	  rm -f $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
+	  $(INSTALL_DATA) $(docobjdir)/g77.1 $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
+	  chmod a-x $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
 	else true; fi
 
 f77.uninstall: installdirs
@@ -293,9 +278,7 @@ f77.uninstall: installdirs
 	  install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/g77.info || : ; \
 	else : ; fi
 	rm -rf $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
-	rm -rf $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
 	rm -rf $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(man1ext); \
-	rm -rf $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(man1ext); \
 	rm -rf $(DESTDIR)$(infodir)/g77.info*
 #\f
 # Clean hooks:
diff -rup gcc-orig/gcc/java/Make-lang.in gcc-cross/gcc/java/Make-lang.in
--- gcc-orig/gcc/java/Make-lang.in	2003-11-24 10:14:23.000000000 -0500
+++ gcc-cross/gcc/java/Make-lang.in	2003-12-05 12:45:32.590086600 -0500
@@ -45,9 +45,6 @@ JAVA_INSTALL_NAME = `echo gcj|sed '$(pro
 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)'`
-
 GCJ = gcj
 
 # Define the names for selecting java in LANGUAGES.
@@ -187,14 +184,12 @@ java.install-normal:
 # be explicitly prefixed) and native builds.
 java.install-common: installdirs
 	-if [ -f $(GCJ)$(exeext) ]; then \
+	  rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
+	  $(INSTALL_PROGRAM) $(GCJ)$(exeext) $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
+	  chmod a+x $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
 	  if [ -f $(GCJ)-cross$(exeext) ]; then \
-	    rm -f $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \
-	    $(INSTALL_PROGRAM) $(GCJ)-cross$(exeext) $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \
-	    chmod a+x $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \
+	    true; \
 	  else \
-	    rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
-	    $(INSTALL_PROGRAM) $(GCJ)$(exeext) $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
-	    chmod a+x $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
 	    rm -f $(DESTDIR)$(bindir)/$(JAVA_TARGET_INSTALL_NAME)$(exeext); \
 	    ( cd $(DESTDIR)$(bindir) && \
 	      $(LN) $(JAVA_INSTALL_NAME)$(exeext) $(JAVA_TARGET_INSTALL_NAME)$(exeext) ); \
@@ -218,9 +213,7 @@ java.install-man:
 
 java.uninstall:
 	-rm -rf $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext)
-	-rm -rf $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext)
 	-rm -rf $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext)
-	-rm -rf $(DESTDIR)$(man1dir)/$(JAVA_CROSS_NAME)$(man1ext)
 	-rm -rf $(DESTDIR)$(man1dir)/gcjh$(man1ext)
 	-rm -rf $(DESTDIR)$(man1dir)/jv-scan$(man1ext)
 	-rm -rf $(DESTDIR)$(man1dir)/jcf-dump$(man1ext)
@@ -404,15 +397,9 @@ rmiregistry.pod: java/gcj.texi
 # Install the man pages.
 java.install-man: installdirs $(GENERATED_JAVA_MANPAGES)
 	-if [ -f $(GCJ)$(exeext) ]; then \
-	  if [ -f $(GCJ)-cross$(exeext) ]; then \
-	    rm -f $(DESTDIR)$(man1dir)/$(JAVA_CROSS_NAME)$(man1ext); \
-	    $(INSTALL_DATA) $(docobjdir)/gcj.1 $(DESTDIR)$(man1dir)/$(JAVA_CROSS_NAME)$(man1ext); \
-	    chmod a-x $(DESTDIR)$(man1dir)/$(JAVA_CROSS_NAME)$(man1ext); \
-	  else \
-	    rm -f $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext); \
-	    $(INSTALL_DATA) $(docobjdir)/gcj.1 $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext); \
-	    chmod a-x $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext); \
-	  fi ; \
+	  rm -f $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext); \
+	  $(INSTALL_DATA) $(docobjdir)/gcj.1 $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext); \
+	  chmod a-x $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext); \
 	fi
 	-rm -f $(DESTDIR)$(man1dir)/gcjh$(man1ext)
 	-$(INSTALL_DATA) $(docobjdir)/gcjh.1 $(DESTDIR)$(man1dir)/gcjh$(man1ext)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question on Makefile.in's program_transform_cross_name
@ 2003-12-05 21:30 Nathanael Nerode
  0 siblings, 0 replies; 4+ messages in thread
From: Nathanael Nerode @ 2003-12-05 21:30 UTC (permalink / raw)
  To: kcook34, gcc

Kelley Cook wrote:
>So those are always the same, which consequently means GCC_INSTALL_NAME and
>GCC_CROSS_NAME are always the same which means I could just delete the
>*_CROSS_NAME lines as well as the numerous spots in the makefile which
>differentiate on them.
 
> Is my analysis of the current situation correct and more importantly if so
> should GCC_INSTALL_NAME always be the same as GCC_CROSS_NAME? I think that
> the answer is yes since configure.in seems to take care of adjusting the sed
> script to prefix the target name.

They should always be the same; there's no actual reason for them to be
different, since as you say configure.in should take care of this.

I know they used to be different before my time, and I hadn't cleaned it up
because I thought they were still different.  :-)  If they are in fact the
same, please eliminate the redundancy!

> If it is then I can submit a separate patch for cleaning up *_CROSS_NAME the
> Makefile and */Make-lang.in files.

This would be very, very much appreciated -- it should eliminate simply *loads*
of cruft and make stuff *lots* more readable!  And probably allow me to
do lots more cleanup as a result!  :-)
 
-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-12-05 21:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-05 16:54 Question on Makefile.in's program_transform_cross_name Kelley Cook
2003-12-05 17:26 ` Daniel Jacobowitz
2003-12-05 23:18 ` Kelley Cook
2003-12-05 21:30 Nathanael Nerode

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).