Makefile in bfd ignores $(DESTDIR) for install-data-local

Maciej W. Rozycki
Mon Oct 11 10:06:00 GMT 1999


 It seems the install-data-local target for bfd has not been updated for
rules of the current automake, i.e. $(DESTDIR) is not being taken into
account which breaks "chrooted" installations.  The following patch fixes
the problem for me.  Here is also a ChangeLog entry.


+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+        e-mail:, PGP key available        +

Mon Oct 11 1999  Maciej W. Rozycki  <>

        * (install-data-local): Prepend $(DESTDIR)
        to $(includedir) like automake does.
        * Regenerate.

diff -u --recursive --new-file binutils.macro/bfd/ binutils/bfd/
--- binutils.macro/bfd/	Thu May 27 21:42:07 1999
+++ binutils/bfd/	Tue Jun 22 11:16:44 1999
@@ -509,10 +509,10 @@
 # Install BFD include file, and others that it needs.
 install-data-local: $(BFD_H)
-	$(mkinstalldirs) $(includedir)
-	$(INSTALL_DATA) $(BFD_H) $(includedir)/bfd.h
-	$(INSTALL_DATA) $(INCDIR)/ansidecl.h $(includedir)/ansidecl.h
-	$(INSTALL_DATA) $(INCDIR)/bfdlink.h $(includedir)/bfdlink.h
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(includedir)/bfd.h
+	$(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(includedir)/ansidecl.h
+	$(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(includedir)/bfdlink.h
 # Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
 .dep: dep.sed $(CFILES) $(HFILES) bfd.h

More information about the Binutils mailing list