PATCH: Support DESTDIR

H. J. Lu hjl@lucon.org
Thu Jan 2 20:21:00 GMT 2003


On Thu, Jan 02, 2003 at 06:09:13PM -0200, Alexandre Oliva wrote:
> On Jan  2, 2003, "H. J. Lu" <hjl@lucon.org> wrote:
> 
> > Makefile never passes DESTDIR to subdirectories and etc doesn't support
> > it at all. "make install DESTDIR=/foo/bar" doesn't work. This patch
> > seems to work for me.
> 
> This patch is ok, but it must be submitted to gcc-patches too since
> the top level is kept in sync between the two repositories.  If you
> have write access to GCC too, please check the top-level changes there
> too, otherwise please wait for someone else who has access to both
> trees to put it in at the same time.  Thanks,
> 

Makefile.tpl and Makefile.in are in sync. etc isn't used by gcc.


H.J.
----
2003-01-02  H.J. Lu <hjl@gnu.org>

	* Makefile.tpl (BASE_FLAGS_TO_PASS): Add DESTDIR.
	* Makefile.in: Regenerated.

etc/
2003-01-02  H.J. Lu <hjl@gnu.org>

	* Makefile.in (DESTDIR): New.
	(install-info): Use it.

--- binutils/Makefile.in.dest	Thu Jan  2 09:52:20 2003
+++ binutils/Makefile.in	Thu Jan  2 10:31:36 2003
@@ -372,6 +372,7 @@ all: all.normal
 # Flags to pass down to all sub-makes.
 # Please keep these in alphabetical order.
 BASE_FLAGS_TO_PASS = \
+	"DESTDIR=$(DESTDIR)" \
 	"AR_FLAGS=$(AR_FLAGS)" \
 	"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
 	"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
--- binutils/Makefile.tpl.dest	Thu Jan  2 09:42:17 2003
+++ binutils/Makefile.tpl	Thu Jan  2 10:31:45 2003
@@ -375,6 +375,7 @@ all: all.normal
 # Flags to pass down to all sub-makes.
 # Please keep these in alphabetical order.
 BASE_FLAGS_TO_PASS = \
+	"DESTDIR=$(DESTDIR)" \
 	"AR_FLAGS=$(AR_FLAGS)" \
 	"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
 	"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
--- binutils/etc/Makefile.in.dest	Thu Jan 31 15:59:04 2002
+++ binutils/etc/Makefile.in	Thu Jan  2 10:40:02 2003
@@ -2,6 +2,8 @@
 # Makefile.in for etc
 #
 
+DESTDIR		=
+
 prefix 		= @prefix@
 exec_prefix 	= @exec_prefix@
 
@@ -68,17 +70,17 @@ info:
 	done
 
 install-info: info
-	$(SHELL) $(srcdir)/../mkinstalldirs $(infodir)
+	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(infodir)
 	if test ! -f standards.info; then cd $(srcdir); fi; \
 	if test -f standards.info; then \
 	  for i in standards.info*; do \
-	    $(INSTALL_DATA) $$i $(infodir)/$$i; \
+	    $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i; \
 	  done; \
 	fi
 	if test ! -f configure.info; then cd $(srcdir); fi; \
 	if test -f configure.info; then \
 	  for i in configure.info*; do \
-	    $(INSTALL_DATA) $$i $(infodir)/$$i; \
+	    $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i; \
 	  done; \
 	fi
 



More information about the Gcc-patches mailing list