This is the mail archive of the binutils@sourceware.org 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]

Re: Borked Makefiles


On Sat, Oct 29, 2005 at 11:16:30PM +0200, Mark Kettenis wrote:
> Ever since:
> 
> 2005-09-30  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* Makefile.am: Run "make dep-am".
> 	* Makefile.in: Regenerated.
> 	* aclocal.m4: Likewise.
> 
> the BFD Makefiles contain dependencies like:
> 
>    bfd.lo: bfd.c ./bfd.h ./bfdver.h ...
> 
> These screw up the BSD make, which doesn't know how to make ./bfd.h.
> Before, we had dependencies like:
> 
>    bfd.lo: bfd.c bfd.h bfdver.h ...
> 
> which are perfectly fine.  Funny thing is, when I reran "make dep-am"
> on my machine, I ended up with the old-style dependencies again.  So
> HJ, it seems that your setup is somewhat broken.
> 

The problem is dep-in.sed doesn't support srcdir != ".". I checked in
the following patch to fix it.


H.J.
----
2005-10-29  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerated.

	* dep-in.sed: Replace " ./" with " ".

--- bfd/Makefile.am.DEP	2005-10-29 16:08:38.000000000 -0700
+++ bfd/Makefile.am	2005-10-29 16:15:57.000000000 -0700
@@ -1088,7 +1088,8 @@ coff-arm.lo: coff-arm.c $(INCDIR)/filena
   libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
 coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
   $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
-  coff-m68k.c $(INCDIR)/hashtab.h libcoff.h $(INCDIR)/bfdlink.h \
+  coff-m68k.c $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h \
+  $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
   coffcode.h coffswap.h
 coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
   $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/h8300.h \
@@ -1778,12 +1779,12 @@ elf32-ia64.lo: elf32-ia64.c $(INCDIR)/fi
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \
   $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \
-  elf32-target.h
+  $(INCDIR)/hashtab.h elf32-target.h
 elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \
   $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \
-  elf64-target.h
+  $(INCDIR)/hashtab.h elf64-target.h
 peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
   $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
   $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
--- bfd/Makefile.in.DEP	2005-10-29 16:08:38.000000000 -0700
+++ bfd/Makefile.in	2005-10-29 16:17:31.000000000 -0700
@@ -1655,7 +1655,8 @@ coff-arm.lo: coff-arm.c $(INCDIR)/filena
   libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
 coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
   $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
-  coff-m68k.c $(INCDIR)/hashtab.h libcoff.h $(INCDIR)/bfdlink.h \
+  coff-m68k.c $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h \
+  $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
   coffcode.h coffswap.h
 coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
   $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/h8300.h \
@@ -2345,12 +2346,12 @@ elf32-ia64.lo: elf32-ia64.c $(INCDIR)/fi
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \
   $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \
-  elf32-target.h
+  $(INCDIR)/hashtab.h elf32-target.h
 elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \
   $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \
-  elf64-target.h
+  $(INCDIR)/hashtab.h elf64-target.h
 peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
   $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
   $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
--- bfd/dep-in.sed.DEP	2003-08-14 00:03:00.000000000 -0700
+++ bfd/dep-in.sed	2005-10-29 16:15:43.000000000 -0700
@@ -4,6 +4,7 @@ s/\\\n */ /g
 t loop
 
 s!\.o:!.lo:!
+s! \./! !g
 s! @BFD_H@!!g
 s!@SRCDIR@/../include!$(INCDIR)!g
 s!@TOPDIR@/include!$(INCDIR)!g


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