aboutsummaryrefslogtreecommitdiff
path: root/2.95.3
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-09-17 07:57:07 +0000
committerMike Frysinger <vapier@gentoo.org>2006-09-17 07:57:07 +0000
commitf7138633b23ba9f226926153168f119c79225919 (patch)
tree54dfdb6cc52fdc2b6a72286d7e511eab33d3daf1 /2.95.3
parentgrab from upstream for #144887 (diff)
downloadgcc-patches-f7138633b23ba9f226926153168f119c79225919.tar.gz
gcc-patches-f7138633b23ba9f226926153168f119c79225919.tar.bz2
gcc-patches-f7138633b23ba9f226926153168f119c79225919.zip
add support for `make install DESTDIR` #124578 by Harald van Dijk
Diffstat (limited to '2.95.3')
-rw-r--r--2.95.3/gentoo/06_all_gcc-2.95.3-DESTDIR.patch944
1 files changed, 944 insertions, 0 deletions
diff --git a/2.95.3/gentoo/06_all_gcc-2.95.3-DESTDIR.patch b/2.95.3/gentoo/06_all_gcc-2.95.3-DESTDIR.patch
new file mode 100644
index 0000000..2a1c97d
--- /dev/null
+++ b/2.95.3/gentoo/06_all_gcc-2.95.3-DESTDIR.patch
@@ -0,0 +1,944 @@
+--- gcc-2.95.3/gcc/cp/Make-lang.in
++++ gcc-2.95.3/gcc/cp/Make-lang.in
+@@ -214,27 +214,28 @@
+ c++.install-common:
+ -if [ -f cc1plus$(exeext) ] ; then \
+ if [ -f g++-cross$(exeext) ] ; then \
+- rm -f $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) g++-cross$(exeext) $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
+- chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
++ chmod a+x $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
+- rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext); \
+- $(LN) $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
++ $(LN) $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext) $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext); \
+ else \
+- rm -f $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) g++$(exeext) $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) g++$(exeext) $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
+- chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
++ chmod a+x $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
+- rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
+- $(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
++ ( cd $(DESTDIR)$(bindir) && \
++ $(LN) $(GXX_INSTALL_NAME)$(exeext) $(CXX_INSTALL_NAME)$(exeext) ); \
+ fi ; \
+ if [ x$(DEMANGLER_PROG) != x ] && [ -x "$(DEMANGLER_PROG)" ]; then \
+ if [ -f g++-cross$(exeext) ] ; then \
+- rm -f $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
+- chmod a+x $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
++ chmod a+x $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \
+ else \
+- rm -f $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
+- chmod a+x $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
++ chmod a+x $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \
+ fi ; \
+ fi ; \
+ fi
+@@ -244,25 +244,25 @@
+ c++.install-man: $(srcdir)/cp/g++.1
+ -if [ -f cc1plus$(exeext) ] ; then \
+ if [ -f g++-cross$(exeext) ] ; then \
+- rm -f $(man1dir)/$(GXX_CROSS_NAME)$(manext); \
++ rm -f $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(manext); \
+- $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(man1dir)/$(GXX_CROSS_NAME)$(manext); \
++ $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(manext); \
+- chmod a-x $(man1dir)/$(GXX_CROSS_NAME)$(manext); \
++ chmod a-x $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(manext); \
+ else \
+- rm -f $(man1dir)/$(GXX_INSTALL_NAME)$(manext); \
++ rm -f $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(manext); \
+- $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(man1dir)/$(GXX_INSTALL_NAME)$(manext); \
++ $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(manext); \
+- chmod a-x $(man1dir)/$(GXX_INSTALL_NAME)$(manext); \
++ chmod a-x $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(manext); \
+ fi; \
+ else true; fi
+
+ c++.uninstall:
+- -rm -rf $(bindir)/$(CXX_INSTALL_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext)
+- -rm -rf $(bindir)/$(CXX_CROSS_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext)
+- -rm -rf $(bindir)/$(GXX_INSTALL_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext)
+- -rm -rf $(bindir)/$(GXX_CROSS_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext)
+- -rm -rf $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext)
+- -rm -rf $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext)
+- -rm -rf $(man1dir)/$(GXX_INSTALL_NAME)$(manext)
++ -rm -rf $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(manext)
+- -rm -rf $(man1dir)/$(GXX_CROSS_NAME)$(manext)
++ -rm -rf $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(manext)
+ #
+ # Clean hooks:
+ # A lot of the ancillary files are deleted by the main makefile.
+--- gcc-2.95.3/gcc/f/Make-lang.in
++++ gcc-2.95.3/gcc/f/Make-lang.in
+@@ -312,18 +312,18 @@
+ # run, since we use libsubdir to store our `flag' file, lang-f77.
+ f77.install-common: installdirs
+ case "$(LANGUAGES)" in \
+- *[fF]77*) touch $(libsubdir)/lang-f77;; \
++ *[fF]77*) touch $(DESTDIR)$(libsubdir)/lang-f77;; \
+- *) rm -f $(libsubdir)/lang-f77;; \
++ *) rm -f $(DESTDIR)$(libsubdir)/lang-f77;; \
+ esac
+- -if [ -f $(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \
++ -if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \
+ if [ -f g77-cross$(exeext) ] ; then \
+- rm -f $(bindir)/$(G77_CROSS_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) g77-cross$(exeext) $(bindir)/$(G77_CROSS_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) g77-cross$(exeext) $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
+- chmod a+x $(bindir)/$(G77_CROSS_NAME)$(exeext); \
++ chmod a+x $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
+ else \
+- rm -f $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) g77$(exeext) $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) g77$(exeext) $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
+- chmod a+x $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
++ chmod a+x $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
+ fi ; \
+ else true; fi
+ @if [ -f f77-install-ok -o -f $(srcdir)/f77-install-ok ]; then \
+@@ -335,7 +335,7 @@
+ echo ' f77-install-ok in the source or build directory.)'; \
+ echo ''; \
+ else true; fi
+- rm -f $(libsubdir)/lang-f77
++ rm -f $(DESTDIR)$(libsubdir)/lang-f77
+
+ # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
+ # to do the install. The sed rule was copied from stmp-int-hdrs.
+@@ -343,66 +343,66 @@
+ # run, since we use libsubdir to store our `flag' file, lang-f77.
+ f77.install-info: f77.info installdirs
+ case "$(LANGUAGES)" in \
+- *[fF]77*) touch $(libsubdir)/lang-f77;; \
++ *[fF]77*) touch $(DESTDIR)$(libsubdir)/lang-f77;; \
+- *) rm -f $(libsubdir)/lang-f77;; \
++ *) rm -f $(DESTDIR)$(libsubdir)/lang-f77;; \
+ esac
+- if [ -f $(libsubdir)/lang-f77 -a -f f/g77.info ] ; then \
++ if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f f/g77.info ] ; then \
+- rm -f $(infodir)/g77.info*; \
++ rm -f $(DESTDIR)$(infodir)/g77.info*; \
+ for f in f/g77.info*; do \
+ realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
+- $(INSTALL_DATA) $$f $(infodir)/$$realfile; \
++ $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$realfile; \
+ done; \
+- chmod a-x $(infodir)/g77.info*; \
++ chmod a-x $(DESTDIR)$(infodir)/g77.info*; \
+ else true; fi
+- @if [ -f $(libsubdir)/lang-f77 -a -f $(srcdir)/f/g77.info ] ; then \
++ @if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f $(srcdir)/f/g77.info ] ; then \
+ if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ echo " install-info --info-dir=$(infodir) $(infodir)/g77.info"; \
+- install-info --info-dir=$(infodir) $(infodir)/g77.info || : ; \
++ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/g77.info || : ; \
+ else : ; fi; \
+ else : ; fi
+- rm -f $(libsubdir)/lang-f77
++ rm -f $(DESTDIR)$(libsubdir)/lang-f77
+
+ # Make sure `installdirs' target (from gcc Makefile) has been
+ # run, since we use libsubdir to store our `flag' file, lang-f77.
+ f77.install-man: $(srcdir)/f/g77.1 installdirs
+ case "$(LANGUAGES)" in \
+- *[fF]77*) touch $(libsubdir)/lang-f77;; \
++ *[fF]77*) touch $(DESTDIR)$(libsubdir)/lang-f77;; \
+- *) rm -f $(libsubdir)/lang-f77;; \
++ *) rm -f $(DESTDIR)$(libsubdir)/lang-f77;; \
+ esac
+- -if [ -f $(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \
++ -if [ -f $(DESTDIR)$(libsubdir)/lang-f77 -a -f f771$(exeext) ] ; then \
+ if [ -f g77-cross$(exeext) ] ; then \
+- rm -f $(man1dir)/$(G77_CROSS_NAME)$(manext); \
++ rm -f $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(manext); \
+- $(INSTALL_DATA) $(srcdir)/f/g77.1 $(man1dir)/$(G77_CROSS_NAME)$(manext); \
++ $(INSTALL_DATA) $(srcdir)/f/g77.1 $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(manext); \
+- chmod a-x $(man1dir)/$(G77_CROSS_NAME)$(manext); \
++ chmod a-x $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(manext); \
+ else \
+- rm -f $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
++ rm -f $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(manext); \
+- $(INSTALL_DATA) $(srcdir)/f/g77.1 $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
++ $(INSTALL_DATA) $(srcdir)/f/g77.1 $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(manext); \
+- chmod a-x $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
++ chmod a-x $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(manext); \
+ fi; \
+ else true; fi
+- rm -f $(libsubdir)/lang-f77
++ rm -f $(DESTDIR)$(libsubdir)/lang-f77
+
+ # Make sure `installdirs' target (from gcc Makefile) has been
+ # run, since we use libsubdir to store our `flag' file, lang-f77.
+ f77.uninstall: installdirs
+ case "$(LANGUAGES)" in \
+- *[fF]77*) touch $(libsubdir)/lang-f77;; \
++ *[fF]77*) touch $(DESTDIR)$(libsubdir)/lang-f77;; \
+- *) rm -f $(libsubdir)/lang-f77;; \
++ *) rm -f $(DESTDIR)$(libsubdir)/lang-f77;; \
+ esac
+- @if [ -f $(libsubdir)/lang-f77 ] ; then \
++ @if [ -f $(DESTDIR)$(libsubdir)/lang-f77 ] ; then \
+ if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+- echo " install-info --delete --info-dir=$(infodir) $(infodir)/g77.info"; \
++ echo " install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/g77.info"; \
+- install-info --delete --info-dir=$(infodir) $(infodir)/g77.info || : ; \
++ install-info --delete --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/g77.info || : ; \
+ else : ; fi; \
+ else : ; fi
+- -if [ -f $(libsubdir)/lang-f77 ]; then \
++ -if [ -f $(DESTDIR)$(libsubdir)/lang-f77 ]; then \
+- rm -rf $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
++ rm -rf $(DESTDIR)$(bindir)/$(G77_INSTALL_NAME)$(exeext); \
+- rm -rf $(bindir)/$(G77_CROSS_NAME)$(exeext); \
++ rm -rf $(DESTDIR)$(bindir)/$(G77_CROSS_NAME)$(exeext); \
+- rm -rf $(man1dir)/$(G77_INSTALL_NAME)$(manext); \
++ rm -rf $(DESTDIR)$(man1dir)/$(G77_INSTALL_NAME)$(manext); \
+- rm -rf $(man1dir)/$(G77_CROSS_NAME)$(manext); \
++ rm -rf $(DESTDIR)$(man1dir)/$(G77_CROSS_NAME)$(manext); \
+- rm -rf $(infodir)/g77.info*; \
++ rm -rf $(DESTDIR)$(infodir)/g77.info*; \
+ fi
+- rm -f $(libsubdir)/lang-f77
++ rm -f $(DESTDIR)$(libsubdir)/lang-f77
+ #
+ # Clean hooks:
+ # A lot of the ancillary files are deleted by the main makefile.
+--- gcc-2.95.3/gcc/java/Make-lang.in
++++ gcc-2.95.3/gcc/java/Make-lang.in
+@@ -144,28 +144,28 @@
+ java.install-common:
+ -if [ -f $(GCJ)$(exeext) ]; then \
+ if [ -f $(GCJ)-cross$(exeext) ]; then \
+- rm -f $(bindir)/$(JAVA_CROSS_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) $(GCJ)-cross$(exeext) $(bindir)/$(JAVA_CROSS_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) $(GCJ)-cross$(exeext) $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \
+- chmod a+x $(bindir)/$(JAVA_CROSS_NAME)$(exeext); \
++ chmod a+x $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext); \
+ else \
+- rm -f $(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) $(GCJ)$(exeext) $(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) $(GCJ)$(exeext) $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
+- chmod a+x $(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
++ chmod a+x $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext); \
+ fi ; \
+ fi ; \
+ for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS); do \
+ if [ -f $$tool$(exeext) ]; then \
+- rm -f $(bindir)/$$tool$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$$tool$(exeext); \
+- $(INSTALL_PROGRAM) $$tool$(exeext) $(bindir)/$$tool$(exeext); \
++ $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$tool$(exeext); \
+- chmod a+x $(bindir)/$$tool$(exeext); \
++ chmod a+x $(DESTDIR)$(bindir)/$$tool$(exeext); \
+ fi ; \
+ done
+
+ java.install-man:
+
+ java.uninstall:
+- -rm -rf $(bindir)/$(JAVA_INSTALL_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(JAVA_INSTALL_NAME)$(exeext)
+- -rm -rf $(bindir)/$(JAVA_CROSS_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(JAVA_CROSS_NAME)$(exeext)
+
+ java.install-info:
+
+--- gcc-2.95.3/gcc/Makefile.in
++++ gcc-2.95.3/gcc/Makefile.in
+@@ -625,6 +625,7 @@
+ "BISONFLAGS=$(BISONFLAGS)" \
+ "CFLAGS=$(CFLAGS)" \
+ "CLIB=$(CLIB)" \
++ "DESTDIR=$(DESTDIR)" \
+ "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "LEX=$(LEX)" \
+@@ -2450,17 +2451,17 @@
+
+ # Handle cpp installation.
+ install-cpp: cpp$(exeext)
+- -rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext)
++ -rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext)
+- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(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 $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(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
+
+ uninstall-cpp:
+- -rm -f $(bindir)/cpp
++ -rm -f $(DESTDIR)$(BINDIR)/cpp
+ -if [ x$(cpp_install_dir) != x ]; then \
+- rm -f $(prefix)/$(cpp_install_dir)/cpp; \
++ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/cpp; \
+ else true; fi
+
+ # Install float.h for cross compiler.
+@@ -2470,163 +2471,164 @@
+ # if [ -f enquire ] ; then true; else false; fi
+ # Note: don't use -. We should fail right away if enquire was not made.
+ ./enquire -f > $(tmpdir)/float.h
+- -rm -f $(libsubdir)/include/float.h
++ -rm -f $(DESTDIR)$(libsubdir)/include/float.h
+- $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
++ $(INSTALL_DATA) $(tmpdir)/float.h $(DESTDIR)$(libsubdir)/include/float.h
+ -rm -f $(tmpdir)/float.h
+- chmod a-x $(libsubdir)/include/float.h
++ chmod a-x $(DESTDIR)$(libsubdir)/include/float.h
+
+ # Create the installation directories.
+ installdirs:
+- -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi
++ -if [ -d $(DESTDIR)$(prefix) ] ; then true ; else mkdir $(DESTDIR)$(prefix) ; chmod a+rx $(DESTDIR)$(prefix) ; fi
+- -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi
++ -if [ -d $(DESTDIR)$(exec_prefix) ] ; then true ; else mkdir $(DESTDIR)$(exec_prefix) ; chmod a+rx $(DESTDIR)$(exec_prefix) ; fi
+- -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
++ -if [ -d $(DESTDIR)$(libdir) ] ; then true ; else mkdir $(DESTDIR)$(libdir) ; chmod a+rx $(DESTDIR)$(libdir) ; fi
+- -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
++ -if [ -d $(DESTDIR)$(libdir)/gcc-lib ] ; then true ; else mkdir $(DESTDIR)$(libdir)/gcc-lib ; chmod a+rx $(DESTDIR)$(libdir)/gcc-lib ; fi
+ # This dir isn't currently searched by cpp.
+ # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
+ -fdir= ; for dir in `echo $(libsubdir) | tr '/' ' '`; do \
+ fdir=$${fdir}/$${dir}; \
+- if [ -d $${fdir} ] ; then true ; else mkdir $${fdir}; chmod a+rx $${fdir}; fi ; \
++ if [ -d $(DESTDIR)$${fdir} ] ; then true ; else mkdir $(DESTDIR)$${fdir}; chmod a+rx $(DESTDIR)$${fdir}; fi ; \
+ done
+- -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
++ -if [ -d $(DESTDIR)$(bindir) ] ; then true ; else mkdir $(DESTDIR)$(bindir) ; chmod a+rx $(DESTDIR)$(bindir) ; fi
+- -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
++ -if [ -d $(DESTDIR)$(includedir) ] ; then true ; else mkdir $(DESTDIR)$(includedir) ; chmod a+rx $(DESTDIR)$(includedir) ; fi
+- -if [ -d $(gcc_tooldir) ] ; then true ; else mkdir $(gcc_tooldir) ; chmod a+rx $(gcc_tooldir) ; fi
++ -if [ -d $(DESTDIR)$(gcc_tooldir) ] ; then true ; else mkdir $(DESTDIR)$(gcc_tooldir) ; chmod a+rx $(DESTDIR)$(gcc_tooldir) ; fi
+- -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
++ -if [ -d $(DESTDIR)$(assertdir) ] ; then true ; else mkdir $(DESTDIR)$(assertdir) ; chmod a+rx $(DESTDIR)$(assertdir) ; fi
+- -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
++ -if [ -d $(DESTDIR)$(infodir) ] ; then true ; else mkdir $(DESTDIR)$(infodir) ; chmod a+rx $(DESTDIR)$(infodir) ; fi
+ # We don't use mkdir -p to create the parents of man1dir,
+ # because some systems don't support it.
+ # Instead, we use this technique to create the immediate parent of man1dir.
+ -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
+- if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
++ if [ -d $(DESTDIR)$$parent ] ; then true ; else mkdir $(DESTDIR)$$parent ; chmod a+rx $(DESTDIR)$$parent ; fi
+- -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi
++ -if [ -d $(DESTDIR)$(man1dir) ] ; then true ; else mkdir $(DESTDIR)$(man1dir) ; chmod a+rx $(DESTDIR)$(man1dir) ; fi
+
+ # Install the compiler executables built during cross compilation.
+ install-common: native installdirs $(EXTRA_PARTS) lang.install-common
+ for file in $(COMPILERS); do \
+ if [ -f $$file ] ; then \
+- rm -f $(libsubdir)/$$file; \
++ rm -f $(DESTDIR)$(libsubdir)/$$file; \
+- $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
++ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libsubdir)/$$file; \
+ else true; \
+ fi; \
+ done
+ for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
+ if [ x"$$file" != x.. ]; then \
+- rm -f $(libsubdir)/$$file; \
++ rm -f $(DESTDIR)$(libsubdir)/$$file; \
+- $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
++ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libsubdir)/$$file; \
+ else true; fi; \
+ done
+ for file in $(EXTRA_PARTS) ..; do \
+ if [ x"$$file" != x.. ]; then \
+- rm -f $(libsubdir)/$$file; \
++ rm -f $(DESTDIR)$(libsubdir)/$$file; \
+- $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
++ $(INSTALL_DATA) $$file $(DESTDIR)$(libsubdir)/$$file; \
+- chmod a-x $(libsubdir)/$$file; \
++ chmod a-x $(DESTDIR)$(libsubdir)/$$file; \
+ else true; fi; \
+ done
+ # Don't mess with specs if it doesn't exist yet.
+ -if [ -f specs ] ; then \
+- rm -f $(libsubdir)/specs; \
++ rm -f $(DESTDIR)$(libsubdir)/specs; \
+- $(INSTALL_DATA) specs $(libsubdir)/specs; \
++ $(INSTALL_DATA) specs $(DESTDIR)$(libsubdir)/specs; \
+- chmod a-x $(libsubdir)/specs; \
++ 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 $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \
+- rm -f $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \
+ else \
+- rm -f $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
+- rm -f $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
+ fi ; \
+- rm -f $(libsubdir)/SYSCALLS.c.X; \
++ rm -f $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
+- $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
++ $(INSTALL_DATA) SYSCALLS.c.X $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
+- chmod a-x $(libsubdir)/SYSCALLS.c.X; \
++ chmod a-x $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
+ fi
+- -rm -f $(libsubdir)/cpp0$(exeext)
++ -rm -f $(DESTDIR)$(libsubdir)/cpp0$(exeext)
+- $(INSTALL_PROGRAM) cpp0$(exeext) $(libsubdir)/cpp0$(exeext)
++ $(INSTALL_PROGRAM) cpp0$(exeext) $(DESTDIR)$(libsubdir)/cpp0$(exeext)
+ # Install gcov if it was compiled.
+ -if [ -f gcov$(exeext) ]; \
+ then \
+- rm -f $(bindir)/gcov$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/gcov$(exeext); \
+- $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) gcov$(exeext) $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
+ fi
+
+ # Install the driver program as $(target_alias)-gcc
+ # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
+ install-driver: xgcc$(exeext)
+ -if [ -f gcc-cross$(exeext) ] ; then \
+- rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \
+- if [ -d $(gcc_tooldir)/bin/. ] ; then \
++ if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
+- rm -f $(gcc_tooldir)/bin/gcc$(exeext); \
++ rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
+- $(INSTALL_PROGRAM) gcc-cross$(exeext) $(gcc_tooldir)/bin/gcc$(exeext); \
++ $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
+ else true; fi; \
+ else \
+- rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
+- $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
++ $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
+- rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \
++ rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-1$(exeext); \
+- $(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \
++ ( cd $(DESTDIR)$(bindir) && \
++ $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_alias)-gcc-1$(exeext) ); \
+- mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \
++ mv $(DESTDIR)$(bindir)/$(target_alias)-gcc-1$(exeext) $(DESTDIR)$(bindir)/$(target_alias)-gcc$(exeext); \
+ fi
+
+ # Install the info files.
+ # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
+ # to do the install.
+ install-info: doc installdirs lang.install-info
+- -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
++ -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
+ for f in cpp.info* gcc.info*; do \
+- $(INSTALL_DATA) $$f $(infodir)/$$f; \
++ $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$f; \
+ done
+ -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+- if [ -f $(infodir)/dir ] ; then \
++ if [ -f $(DESTDIR)$(infodir)/dir ] ; then \
+ for f in cpp.info gcc.info; do \
+- install-info --dir-file=$(infodir)/dir $(infodir)/$$f; \
++ install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/$$f; \
+ done; \
+ else true; fi; \
+ else true; fi;
+- -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
++ -chmod a-x $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
+
+ # Install the man pages.
+ install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
+ -if [ -f gcc-cross$(exeext) ] ; then \
+- rm -f $(man1dir)/$(GCC_CROSS_NAME)$(manext); \
++ rm -f $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(manext); \
+- $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_CROSS_NAME)$(manext); \
++ $(INSTALL_DATA) $(srcdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(manext); \
+- chmod a-x $(man1dir)/$(GCC_CROSS_NAME)$(manext); \
++ chmod a-x $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(manext); \
+ else \
+- rm -f $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
++ rm -f $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
+- $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
++ $(INSTALL_DATA) $(srcdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
+- chmod a-x $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
++ chmod a-x $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
+ fi
+- -rm -f $(man1dir)/cccp$(manext)
++ -rm -f $(DESTDIR)$(man1dir)/cccp$(manext)
+- -$(INSTALL_DATA) $(srcdir)/cccp.1 $(man1dir)/cccp$(manext)
++ -$(INSTALL_DATA) $(srcdir)/cccp.1 $(DESTDIR)$(man1dir)/cccp$(manext)
+- -chmod a-x $(man1dir)/cccp$(manext)
++ -chmod a-x $(DESTDIR)$(man1dir)/cccp$(manext)
+
+ # Install the library.
+ install-libgcc: libgcc.a installdirs
+ -if [ -f libgcc.a ] ; then \
+- rm -f $(libsubdir)/libgcc.a; \
++ rm -f $(DESTDIR)$(libsubdir)/libgcc.a; \
+- $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
++ $(INSTALL_DATA) libgcc.a $(DESTDIR)$(libsubdir)/libgcc.a; \
+ if $(RANLIB_TEST_FOR_TARGET) ; then \
+- (cd $(libsubdir); $(RANLIB_FOR_TARGET) libgcc.a); else true; fi; \
++ (cd $(DESTDIR)$(libsubdir); $(RANLIB_FOR_TARGET) libgcc.a); else true; fi; \
+- chmod a-x $(libsubdir)/libgcc.a; \
++ chmod a-x $(DESTDIR)$(libsubdir)/libgcc.a; \
+ else true; fi
+
+ # Install multiple versions of libgcc.a.
+ install-multilib: stmp-multilib installdirs
+ for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
+ dir=`echo $$i | sed -e 's/;.*$$//'`; \
+- if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
++ if [ -d $(DESTDIR)$(libsubdir)/$${dir} ]; then true; else mkdir $(DESTDIR)$(libsubdir)/$${dir}; fi; \
+ for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \
+- rm -f $(libsubdir)/$${dir}/$${f}; \
++ rm -f $(DESTDIR)$(libsubdir)/$${dir}/$${f}; \
+- $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \
++ $(INSTALL_DATA) $${dir}/$${f} $(DESTDIR)$(libsubdir)/$${dir}/$${f}; \
+ done; \
+ if $(RANLIB_TEST_FOR_TARGET); then \
+- (cd $(libsubdir)/$${dir}; $(RANLIB_FOR_TARGET) libgcc.a); \
++ (cd $(DESTDIR)$(libsubdir)/$${dir}; $(RANLIB_FOR_TARGET) libgcc.a); \
+ else true; fi; \
+- chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
++ chmod a-x $(DESTDIR)$(libsubdir)/$${dir}/libgcc.a; \
+ done
+
+ # Install all the header files built in the include subdirectory.
+@@ -2634,23 +2636,23 @@
+ # Fix symlinks to absolute paths in the installed include directory to
+ # point to the installed directory, not the build directory.
+ # Don't need to use LN_S here since we really do need ln -s and no substitutes.
+- -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
++ -files=`cd $(DESTDIR)$(libsubdir)/include; find . -type l -print 2>/dev/null`; \
+ if [ $$? -eq 0 ]; then \
+ dir=`cd include; pwd`; \
+ for i in $$files; do \
+ dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
+ if expr "$$dest" : "$$dir.*" > /dev/null; then \
+- rm -f $(libsubdir)/include/$$i; \
++ rm -f $(DESTDIR)$(libsubdir)/include/$$i; \
+- ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
++ ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(DESTDIR)$(libsubdir)/include/$$i; \
+ fi; \
+ done; \
+ fi
+
+ # Create or recreate the gcc private include file directory.
+ install-include-dir: installdirs
+- -rm -rf $(libsubdir)/include
++ -rm -rf $(DESTDIR)$(libsubdir)/include
+- mkdir $(libsubdir)/include
++ mkdir $(DESTDIR)$(libsubdir)/include
+- -chmod a+rx $(libsubdir)/include
++ -chmod a+rx $(DESTDIR)$(libsubdir)/include
+
+ # Install the include directory using tar.
+ install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
+@@ -2659,7 +2661,7 @@
+ # found in CDPATH, corrupting the output. We could just redirect the
+ # output of `cd', but some shells lose on redirection within `()'s
+ (cd `pwd`/include ; \
+- tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
++ tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar $(TAROUTOPTS) - )
+ # /bin/sh on some systems returns the status of the first tar,
+ # and that can lose with GNU tar which always writes a full block.
+ # So use `exit 0' to ignore its exit status.
+@@ -2668,7 +2670,7 @@
+ install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
+ # See discussion about the use of `pwd` above
+ cd `pwd`/include ; \
+- find . -print | cpio -pdum $(libsubdir)/include
++ find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include
+
+ # Put assert.h where it won't override GNU libc's assert.h.
+ # It goes in a dir that is searched after GNU libc's headers;
+@@ -2678,43 +2680,43 @@
+ ## This code would be simpler if it tested for -f ... && ! grep ...
+ ## but supposedly the ! operator is missing in sh on some systems.
+ install-assert-h: assert.h installdirs
+- if [ -f $(assertdir)/assert.h ]; \
++ if [ -f $(DESTDIR)$(assertdir)/assert.h ]; \
+ then \
+- if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
++ if grep "__eprintf" $(DESTDIR)$(assertdir)/assert.h >/dev/null; \
+ then \
+- rm -f $(assertdir)/assert.h; \
++ rm -f $(DESTDIR)$(assertdir)/assert.h; \
+- $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
++ $(INSTALL_DATA) $(srcdir)/assert.h $(DESTDIR)$(assertdir)/assert.h; \
+- chmod a-x $(assertdir)/assert.h; \
++ chmod a-x $(DESTDIR)$(assertdir)/assert.h; \
+ else true; \
+ fi; \
+ else \
+- rm -f $(assertdir)/assert.h; \
++ rm -f $(DESTDIR)$(assertdir)/assert.h; \
+- $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
++ $(INSTALL_DATA) $(srcdir)/assert.h $(DESTDIR)$(assertdir)/assert.h; \
+- chmod a-x $(assertdir)/assert.h; \
++ chmod a-x $(DESTDIR)$(assertdir)/assert.h; \
+ fi
+
+ # Use this target to install the program `collect2' under the name `collect2'.
+ install-collect2: collect2 installdirs
+- $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/collect2$(exeext)
++ $(INSTALL_PROGRAM) collect2$(exeext) $(DESTDIR)$(libsubdir)/collect2$(exeext)
+ # Install the driver program as $(libsubdir)/gcc for collect2.
+- $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
++ $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(libsubdir)/gcc$(exeext)
+
+ # Cancel installation by deleting the installed files.
+ uninstall: intl.uninstall lang.uninstall $(UNINSTALL_CPP)
+- -rm -rf $(libsubdir)
++ -rm -rf $(DESTDIR)$(libsubdir)
+- -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
+- -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext)
+- -rm -rf $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext)
+- -rm -rf $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext)
+- -rm -rf $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext)
+- -rm -rf $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext)
+- -rm -rf $(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
++ -rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
+- -rm -rf $(man1dir)/$(GCC_INSTALL_NAME)$(manext)
++ -rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(manext)
+- -rm -rf $(man1dir)/$(GCC_CROSS_NAME)$(manext)
++ -rm -rf $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(manext)
+- -rm -rf $(man1dir)/cccp$(manext)
++ -rm -rf $(DESTDIR)$(man1dir)/cccp$(manext)
+- -rm -rf $(man1dir)/protoize$(manext)
++ -rm -rf $(DESTDIR)$(man1dir)/protoize$(manext)
+- -rm -rf $(man1dir)/unprotoize$(manext)
++ -rm -rf $(DESTDIR)$(man1dir)/unprotoize$(manext)
+- -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
++ -rm -f $(DESTDIR)$(infodir)/cpp.info* $(infodir)/gcc.info*
+ #
+ # These targets are for the dejagnu testsuites. The file site.exp
+ # contains global variables that all the testsuites will use.
+--- gcc-2.95.3/gcc/po/Makefile.in.in
++++ gcc-2.95.3/gcc/po/Makefile.in.in
+@@ -111,9 +111,9 @@
+ install-data-no: all
+ install-data-yes: all
+ if test -r "$(MKINSTALLDIRS)"; then \
+- $(MKINSTALLDIRS) $(datadir); \
++ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
+ else \
+- $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
++ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+@@ -125,27 +125,27 @@
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r "$(MKINSTALLDIRS)"; then \
+- $(MKINSTALLDIRS) $$dir; \
++ $(MKINSTALLDIRS) $(DESTDIR)$$dir; \
+ else \
+- $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
++ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$$dir; \
+ fi; \
+ if test -r $$cat; then \
+- $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
++ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT); \
+- echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
++ $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ "$(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+- $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ $(INSTALL_DATA) $$cat.m $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+- echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ echo "installing $$cat.m as $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+- $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ "$(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+@@ -153,12 +153,12 @@
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r "$(MKINSTALLDIRS)"; then \
+- $(MKINSTALLDIRS) $(gettextsrcdir); \
++ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
+ else \
+- $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
++ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+- $(gettextsrcdir)/Makefile.in.in; \
++ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+@@ -171,12 +171,12 @@
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
++ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
++ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
++ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ done
+- rm -f $(gettextsrcdir)/po-Makefile.in.in
++ rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
+
+ check: all
+
+--- gcc-2.95.3/libf2c/Makefile.in
++++ gcc-2.95.3/libf2c/Makefile.in
+@@ -197,10 +197,10 @@
+ cd libU77; $(MAKE) G77DIR=../../../gcc/ check
+
+ install: all
+- $(INSTALL_DATA) $(LIBG2C) $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n
++ $(INSTALL_DATA) $(LIBG2C) $(DESTDIR)$(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n
+- ( cd $(libsubdir)/$(MULTISUBDIR) ; $(RANLIB) $(LIBG2C).n )
++ ( cd $(DESTDIR)$(libsubdir)/$(MULTISUBDIR) ; $(RANLIB) $(LIBG2C).n )
+- mv -f $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C)
++ mv -f $(DESTDIR)$(libsubdir)/$(MULTISUBDIR)/$(LIBG2C).n $(DESTDIR)$(libsubdir)/$(MULTISUBDIR)/$(LIBG2C)
+- $(INSTALL_DATA) g2c.h $(libsubdir)/include/g2c.h
++ $(INSTALL_DATA) g2c.h $(DESTDIR)$(libsubdir)/include/g2c.h
+ @if [ -f f2c-install-ok -o -f $(srcdir)/f2c-install-ok ]; then \
+ echo ''; \
+ echo 'Warning: g77 no longer installs libf2c.a or f2c.h.'; \
+@@ -216,7 +216,7 @@
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
+
+ uninstall:
+- rm -f $(libsubdir)/$(MULTISUBDIR)/include/g2c.h $(libsubdir)/$(MULTISUBDIR)/$(LIBG2C)
++ rm -f $(DESTDIR)$(libsubdir)/$(MULTISUBDIR)/include/g2c.h $(DESTDIR)$(libsubdir)/$(MULTISUBDIR)/$(LIBG2C)
+ $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
+
+ mostlyclean:
+--- gcc-2.95.3/libiberty/Makefile.in
++++ gcc-2.95.3/libiberty/Makefile.in
+@@ -148,15 +148,15 @@
+ install: install_to_$(INSTALL_DEST) install-subdir
+
+ install_to_libdir: all
+- $(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB).n
++ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB).n
+- ( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB).n )
++ ( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB).n )
+- mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB).n $(libdir)$(MULTISUBDIR)/$(TARGETLIB)
++ mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB).n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)
+ @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
+
+ install_to_tooldir: all
+- $(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n
++ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n
+- ( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB).n )
++ ( cd $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB).n )
+- mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
++ mv -f $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
+ @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
+
+ # needed-list is used by libstdc++. NEEDED is the list of functions
+--- gcc-2.95.3/libio/Makefile.in
++++ gcc-2.95.3/libio/Makefile.in
+@@ -113,19 +113,19 @@
+ if [ -z "$(MULTISUBDIR)" ]; then \
+ if [ "$(_G_CONFIG_H)" != "" ]; then \
+ if [ x$(enable_version_specific_runtime_libs) = xyes ]; then \
+- rm -f $(gxx_include_dir)/_G_config.h ; \
++ rm -f $(DESTDIR)$(gxx_include_dir)/_G_config.h ; \
+- $(INSTALL_DATA) _G_config.h $(gxx_include_dir)/_G_config.h || exit 1; \
++ $(INSTALL_DATA) _G_config.h $(DESTDIR)$(gxx_include_dir)/_G_config.h || exit 1; \
+ else \
+- rm -f $(tooldir)/include/_G_config.h ; \
++ rm -f $(DESTDIR)$(tooldir)/include/_G_config.h ; \
+- $(INSTALL_DATA) _G_config.h $(tooldir)/include/_G_config.h || exit 1; \
++ $(INSTALL_DATA) _G_config.h $(DESTDIR)$(tooldir)/include/_G_config.h || exit 1; \
+ fi; \
+ else true; \
+ fi ; \
+ cd $(srcdir); \
+ for FILE in $(USER_INCLUDES); do if [ $$FILE != _G_config.h ]; then \
+- rm -f $(gxx_include_dir)/$$FILE ; \
++ rm -f $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+- $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
++ $(INSTALL_DATA) $$FILE $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+- chmod a-x $(gxx_include_dir)/$$FILE ; \
++ chmod a-x $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+ else true; fi; done ; \
+ else true; \
+ fi
+--- gcc-2.95.3/libstdc++/Makefile.in
++++ gcc-2.95.3/libstdc++/Makefile.in
+@@ -263,24 +263,24 @@
+ if [ -z "$(MULTISUBDIR)" ]; then \
+ cd $(srcdir); \
+ for FILE in $(HEADERS); do \
+- rm -f $(gxx_include_dir)/$$FILE ; \
++ rm -f $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+ if [ -f stl/$$FILE ]; then \
+- $(INSTALL_DATA) stl/$$FILE $(gxx_include_dir)/$$FILE ; \
++ $(INSTALL_DATA) stl/$$FILE $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+ else \
+- $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
++ $(INSTALL_DATA) $$FILE $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+ fi ; \
+- chmod a-x $(gxx_include_dir)/$$FILE ; \
++ chmod a-x $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+ done ; \
+ for FILE in *.h std/*.h std/*.cc std/*.tcc; do \
+- rm -f $(gxx_include_dir)/$$FILE ; \
++ rm -f $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+- $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
++ $(INSTALL_DATA) $$FILE $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+- chmod a-x $(gxx_include_dir)/$$FILE ; \
++ chmod a-x $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+ done ; \
+ cd stl; \
+ for FILE in *.h; do \
+- rm -f $(gxx_include_dir)/$$FILE ; \
++ rm -f $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+- $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
++ $(INSTALL_DATA) $$FILE $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+- chmod a-x $(gxx_include_dir)/$$FILE ; \
++ chmod a-x $(DESTDIR)$(gxx_include_dir)/$$FILE ; \
+ done ; \
+ else true ; \
+ fi
+@@ -312,50 +312,50 @@
+ RELINSTALLDIR=../$${RELINSTALLDIR}$(target_alias)/lib/;; \
+ esac; \
+ fi; \
+- rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(SHLINK) ; \
++ rm -f $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$(SHLINK) ; \
+- rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(ARLINK) ; \
++ rm -f $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$(ARLINK) ; \
+ for FILE in $(LIBS) ; do \
+- rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
++ rm -f $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
+ if [ $$FILE = $(SHLINK) ] ; then \
+ if [ -f $${INSTALLDIR}/$(MSHLINK) ]; then \
+- rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
++ rm -f $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+- $(LN_S) $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
++ $(LN_S) $${RELINSTALLDIR}$(MSHLINK) $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
+- || cp $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
++ || cp $${RELINSTALLDIR}$(MSHLINK) $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+ else \
+- rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
++ rm -f $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+- $(LN_S) $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
++ $(LN_S) $${RELINSTALLDIR}$(SHLIB) $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
+- || cp $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
++ || cp $${RELINSTALLDIR}$(SHLIB) $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+ fi; \
+ elif [ $$FILE = $(ARLINK) ] ; then \
+- if [ -f $${INSTALLDIR}/$(MARLINK) ]; then \
++ if [ -f $(DESTDIR)$${INSTALLDIR}/$(MARLINK) ]; then \
+- rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
++ rm -f $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+- $(LN_S) $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
++ $(LN_S) $${RELINSTALLDIR}$(MARLINK) $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
+- || cp $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
++ || cp $${RELINSTALLDIR}$(MARLINK) $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+ else \
+- rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
++ rm -f $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+- $(LN_S) $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
++ $(LN_S) $${RELINSTALLDIR}$(ARLIB) $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
+- || cp $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
++ || cp $${RELINSTALLDIR}$(ARLIB) $(DESTDIR)$${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+ fi; \
+ elif [ $$FILE = mshlink ]; then \
+ for FILE in $(MSHLINK) ; do \
+- rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
++ rm -f $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
+- $(LN_S) $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE \
++ $(LN_S) $(SHLIB) $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE \
+- || cp $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
++ || cp $(SHLIB) $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
+ done; \
+ elif [ $$FILE = marlink ]; then \
+ for FILE in $(MARLINK) ; do \
+- rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
++ rm -f $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
+- $(LN_S) $(ARLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE \
++ $(LN_S) $(ARLIB) $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE \
+- || cp $(ARLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
++ || cp $(ARLIB) $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
+ done; \
+ elif [ $$FILE = $(SHLIB) ]; then \
+- $(INSTALL_PROGRAM) $$FILE $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
++ $(INSTALL_PROGRAM) $$FILE $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
+ : On the HP, shared libraries must be mode 555. ;\
+- chmod 555 $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
++ chmod 555 $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
+ else \
+- $(INSTALL_DATA) $$FILE $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
++ $(INSTALL_DATA) $$FILE $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
+- $(RANLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
++ $(RANLIB) $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
+- chmod a-x $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
++ chmod a-x $(DESTDIR)$${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
+ fi ; \
+ done
+ @rootme=`pwd`/ ; export rootme ; \
+--- gcc-2.95.3/Makefile.in
++++ gcc-2.95.3/Makefile.in
+@@ -375,6 +375,7 @@
+ "CXXFLAGS=$(CXXFLAGS)" \
+ "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
+ "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
++ "DESTDIR=$(DESTDIR)" \
+ "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \