This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

get g++ man page to point to the right gcc man page


Currently, our g++.1 just points to gcc.1, even though, on cross
tools, we install them as <target>-{gcc,g++}.1, and so <target>-g++.1
ends up with a dangling pointer.  This patch fixes the problem, such
that we generate g++.1 in such a way that it points to the correct
gcc.1.  Tested with native athlon-pc-linux-gnu and cross to
mips64-linux-gnu build and install.  I'm checking this in mainline.

Index: gcc/cp/ChangeLog
from  Alexandre Oliva  <aoliva at redhat dot com>

	* g++.1: Remove.
	* Make-lang.in (c++.generated-manpages): Build cp/g++.1.
	(cp/g++.1): Build it from scratch in the build tree.
	(c++.install-man): Depend on it.  Install it from the build tree.
	(c++.mostlyclean): Clean it.

Index: gcc/cp/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/Make-lang.in,v
retrieving revision 1.138
diff -u -p -r1.138 Make-lang.in
--- gcc/cp/Make-lang.in 11 Mar 2003 06:42:19 -0000 1.138
+++ gcc/cp/Make-lang.in 12 Mar 2003 04:10:03 -0000
@@ -119,7 +119,7 @@ c++.tags: force
 
 c++.info: 
 c++.dvi:
-c++.generated-manpages:
+c++.generated-manpages: cp/g++.1
 
 #
 # Install hooks:
@@ -164,15 +164,23 @@ c++.install-common: installdirs
 
 c++.install-info: 
 
-c++.install-man: installdirs $(srcdir)/cp/g++.1
+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
+
+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) $(srcdir)/cp/g++.1 $(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) $(srcdir)/cp/g++.1 $(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; \
 	else true; fi
@@ -190,6 +198,7 @@ c++.uninstall:
 # We just have to delete files specific to us.
 
 c++.mostlyclean:
+	-rm -f cp/g++.1
 	-rm -f cp/*$(objext)
 	-rm -f cp/*$(coverageexts)
 c++.clean:
Index: gcc/cp/g++.1
===================================================================
RCS file: gcc/cp/g++.1
diff -N gcc/cp/g++.1
--- gcc/cp/g++.1 13 Jan 2001 21:17:13 -0000 1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
-.so man1/gcc.1
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist                Professional serial bug killer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]