This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
mkdep
- To: binutils at sourceware dot cygnus dot com
- Subject: mkdep
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Mon, 3 Apr 2000 18:32:08 +1000 (EST)
- cc: ian at zembu dot com
I thought it might be a good idea to run mkdep over all the Makefiles
before the release, and immediately hit a snag. I didn't have a copy of
the NetBSD mkdep on my system. Well that problem is easily fixed by
downloading the mkdep sources and compiling, but instead I decided to
modify the Makefiles to use "gcc -MM". The following patch is for
bfd/Makefile.am, and shows that indeed the dependencies did need updating.
Very similar patces apply to the other Makefiles.
OK to install?
Alan Modra
--
Linuxcare. Support for the Revolution.
bfd/ChangeLog
* Makefile.am: Remove extraneous mkdep comment.
(MKDEP): Use gcc -MM rather than mkdep.
(DEP): Quote when passing vars to sub-make. Add warning
message to end.
(DEP1): Rewrite for "gcc -MM".
Update dependencies.
Index: bfd/Makefile.am
===================================================================
RCS file: /cvs/src/src/bfd/Makefile.am,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile.am
--- Makefile.am 2000/03/27 08:39:12 1.15
+++ Makefile.am 2000/04/03 07:52:20
@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = cygnus
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
-MKDEP = mkdep
+MKDEP = gcc -MM
SUBDIRS = doc po
@@ -546,22 +546,14 @@ install-data-local: $(BFD_H)
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
DEP: dep.sed $(CFILES) $(HFILES) bfd.h
rm -f DEP1
- $(MAKE) MKDEP=$(MKDEP) DEP1
- sed -f dep.sed <DEP1 >DEP
+ $(MAKE) MKDEP="$(MKDEP)" DEP1
+ sed -f dep.sed < DEP1 > $@
+ echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@
-# This rule really wants a mkdep that runs "gcc -MM".
-# The NetBSD mkdep overwrites any existing file contents, and doesn't insert
-# the "DO NOT DELETE" line.
-# Other mkdep versions require a file that already exists, and do insert it.
-# Hence the weirdness....
DEP1: $(CFILES)
- rm -f DEP2 DEP2a
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
- echo > DEP2a
- $(MKDEP) -f DEP2a $(INCLUDES) $(CFLAGS) $?
- sed -e '/DO NOT DELETE/d' -e '/^$$/d' < DEP2a >> DEP2
- rm -f DEP2a
- $(SHELL) $(srcdir)/../move-if-change DEP2 DEP1
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > $@
+ echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> $@
+ $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> $@
dep.sed: dep-in.sed config.status
sed <$(srcdir)/dep-in.sed >dep.sed \
@@ -656,7 +648,6 @@ elfarm-oabi.lo: elfarm-oabi.c elf32-arm.
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
-# What appears below is generated by a hacked mkdep using gcc -MM.
elfarm-nabi.lo: elfarm-nabi.c elf32-arm.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
@@ -704,6 +695,7 @@ cpu-fr30.lo: cpu-fr30.c
cpu-h8300.lo: cpu-h8300.c
cpu-h8500.lo: cpu-h8500.c
cpu-hppa.lo: cpu-hppa.c
+cpu-i370.lo: cpu-i370.c
cpu-i386.lo: cpu-i386.c
cpu-i860.lo: cpu-i860.c
cpu-i960.lo: cpu-i960.c
@@ -870,10 +862,10 @@ elf32-fr30.lo: elf32-fr30.c elf-bfd.h $(
$(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf32-target.h
-elf32-i370.lo: elf32-i370.c elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-target.h
+elf32-i370.lo: elf32-i370.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/i370.h elf32-target.h
elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
@@ -1027,12 +1019,6 @@ pe-i386.lo: pe-i386.c coff-i386.c $(INCD
pei-i386.lo: pei-i386.c coff-i386.c $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-pe-mips.lo: pe-mips.c $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h
-pei-mips.lo: pei-mips.c pe-mips.c $(INCDIR)/coff/mipspe.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h
pe-mcore.lo: pe-mcore.c coff-mcore.c $(INCDIR)/coff/mcore.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
@@ -1047,10 +1033,16 @@ pei-ppc.lo: pei-ppc.c coff-ppc.c $(INCDI
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pe-sh.lo: pe-sh.c coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- coffcode.h peicode.h
+ coffcode.h peicode.h libpei.h
pei-sh.lo: pei-sh.c coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ coffcode.h peicode.h libpei.h
+pe-mips.lo: pe-mips.c $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+pei-mips.lo: pei-mips.c pe-mips.c $(INCDIR)/coff/mipspe.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- coffcode.h peicode.h
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
peigen.lo: peigen.c $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
ppcboot.lo: ppcboot.c