This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

PATCH: Support DESTDIR


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.


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
 


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