From a5220fb9526bd43d4560927b1f860bf1e4737522 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 16 Jun 1993 02:22:02 +0000 Subject: [PATCH] Move bfd.h to ../include. (Directory is created if it doesn't exist.) Insert sysdep.h into it, so manually including it isn't required for every single file using bfd.h. Search ../include when compiling. --- bfd/Makefile.in | 130 +++++++++++++++++++++++++++--------------------- 1 file changed, 72 insertions(+), 58 deletions(-) diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 28c9556968c..d213eee0cd2 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -58,7 +58,7 @@ RANLIB = ranlib CC_FOR_BUILD = $(CC) INCDIR = $(srcdir)/../include -CSEARCH = -I. -I$(srcdir) -I$(INCDIR) +CSEARCH = -I. -I$(srcdir) -I../include -I$(INCDIR) DEP = mkdep SUBDIRS = doc @@ -66,6 +66,8 @@ SUBDIRS = doc TARGETLIB = libbfd.a +# bfd.h goes here, for now +BFD_H = ../include/bfd.h BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o \ archures.o core.o section.o format.o syms.o reloc.o init.o \ @@ -215,10 +217,10 @@ clobber realclean: # sysdep.h might actually move backwards if we reconfig and relink it # to a different hosts/h-xxx.h file. This will force a recompile anyway. RECONFIG = config.status -$(BFD_LIBS): libbfd.h bfd.h $(RECONFIG) -$(BFD_MACHINES): libbfd.h bfd.h $(RECONFIG) -$(BFD_BACKENDS): libbfd.h bfd.h $(RECONFIG) -$(OPTIONAL_BACKENDS): libbfd.h bfd.h $(RECONFIG) +$(BFD_LIBS): libbfd.h $(BFD_H) $(RECONFIG) +$(BFD_MACHINES): libbfd.h $(BFD_H) $(RECONFIG) +$(BFD_BACKENDS): libbfd.h $(BFD_H) $(RECONFIG) +$(OPTIONAL_BACKENDS): libbfd.h $(BFD_H) $(RECONFIG) # Get around a Sun Make bug in SunOS 4.1.1 with VPATH cpu-i386.o:cpu-i386.c @@ -278,14 +280,14 @@ install: # Install BFD include file, and others that it needs. Install them # both in GCC's include directory, and in the system include dir # if configured as $(oldincludedir) -- which it usually isnt. - $(INSTALL_DATA) bfd.h $(includedir)/bfd.h + $(INSTALL_DATA) $(BFD_H) $(includedir)/bfd.h $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(includedir)/ansidecl.h $(INSTALL_DATA) $(INCDIR)/obstack.h $(includedir)/obstack.h -if [ -z "$(oldincludedir)" ] ; then true ; \ else if [ -d $(oldincludedir) ] ; then true ; \ else mkdir $(oldincludedir) ; \ fi ; \ - $(INSTALL_DATA) bfd.h $(oldincludedir)/bfd.h;\ + $(INSTALL_DATA) $(BFD_H) $(oldincludedir)/bfd.h;\ $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(oldincludedir)/ansidecl.h;\ $(INSTALL_DATA) $(INCDIR)/obstack.h $(oldincludedir)/obstack.h;\ fi @@ -309,16 +311,28 @@ gen-aout: $(srcdir)/gen-aout.c Makefile BFDIN_H= $(srcdir)/bfd-in2.h -bfd.h: stmp-bfd.h ; @true +$(BFD_H): stmp-bfd.h ; @true +# The funny stuff here with the generated script is because I haven't +# figured out how to get sed to generate the correct sed script. If you +# can get it to work, portably, please let me know! stmp-bfd.h : $(BFDIN_H) Makefile - sed -e 's/@WORDSIZE@/$(WORDSIZE)/' < $(BFDIN_H) > bfd.h2 - $(srcdir)/../move-if-change bfd.h2 bfd.h + rm -f sysdep.sed nsysdep.h + echo "exec sed -e '/^\\$$/d' \\" > sysdep.sed + grep -n '#include.*hosts/' sysdep.h \ + | sed -e 's|\([0-9]*\):.*hosts/\(.*\)"| -e "\1r $(srcdir)/hosts/\2" -e \1d \\|' \ + >> sysdep.sed + echo "" >> sysdep.sed + sh sysdep.sed < sysdep.h > nsysdep.h + sed -e 's/@WORDSIZE@/$(WORDSIZE)/' \ + -e '/INSERT SYSDEP HERE/ r nsysdep.h' < $(BFDIN_H) > bfd.h2 + test -d ../include || mkdir ../include + $(srcdir)/../move-if-change bfd.h2 $(BFD_H) touch stmp-bfd.h +# Could really use a "copy-if-change"... headers: (cd $(docdir); $(MAKE) protos $(FLAGS_TO_PASS)) -# Could really use a "copy-if-change"... cp $(docdir)/bfd.h bfd.h-new $(srcdir)/../move-if-change bfd.h-new $(BFDIN_H) cp $(docdir)/libbfd.h libbfd.h-new @@ -340,117 +354,117 @@ bfd.ps: # DO NOT DELETE THIS LINE -- mkdep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. -libbfd.o : libbfd.c bfd.h $(INCDIR)/obstack.h libbfd.h -opncls.o : opncls.c bfd.h $(INCDIR)/obstack.h libbfd.h -bfd.o : bfd.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +libbfd.o : libbfd.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h +opncls.o : opncls.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h +bfd.o : bfd.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/sym.h libecoff.h -archive.o : archive.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +archive.o : archive.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h -targets.o : targets.c bfd.h $(INCDIR)/obstack.h libbfd.h -cache.o : cache.c bfd.h $(INCDIR)/obstack.h libbfd.h -archures.o : archures.c bfd.h $(INCDIR)/obstack.h +targets.o : targets.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h +cache.o : cache.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h +archures.o : archures.c $(BFD_H) $(INCDIR)/obstack.h aout64.o : aout64.c -aout32.o : aout32.c aoutx.h bfd.h $(INCDIR)/ansidecl.h \ +aout32.o : aout32.c aoutx.h $(BFD_H) $(INCDIR)/ansidecl.h \ $(INCDIR)/obstack.h libaout.h libbfd.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -sunos.o : sunos.c aoutf1.h bfd.h $(INCDIR)/obstack.h \ +sunos.o : sunos.c aoutf1.h $(BFD_H) $(INCDIR)/obstack.h \ libaout.h libbfd.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h demo64.o : demo64.c -srec.o : srec.c bfd.h $(INCDIR)/obstack.h libbfd.h -oasys.o : oasys.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +srec.o : srec.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h +oasys.o : oasys.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/oasys.h liboasys.h -ieee.o : ieee.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +ieee.o : ieee.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/ieee.h libieee.h -coff-h8300.o: coff-h8300.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-h8300.o: coff-h8300.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \ coffswap.h seclet.h -coff-h8500.o: coff-h8500.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-h8500.o: coff-h8500.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \ coffswap.h seclet.h -coff-a29k.o: coff-a29k.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-a29k.o: coff-a29k.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \ coffswap.h seclet.h -coff-i386.o: coff-i386.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-i386.o: coff-i386.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \ coffswap.h seclet.h -coff-i960.o: coff-i960.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-i960.o: coff-i960.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \ coffswap.h seclet.h -coff-m68k.o: coff-m68k.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-m68k.o: coff-m68k.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \ coffswap.h seclet.h -coff-m88k.o: coff-m88k.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-m88k.o: coff-m88k.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \ coffswap.h seclet.h -coff-mips.o: coff-mips.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-mips.o: coff-mips.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/mips.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \ coffswap.h seclet.h libecoff.h -coff-rs6000.o: coff-rs6000.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-rs6000.o: coff-rs6000.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/rs6000.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \ coffswap.h seclet.h -coff-z8k.o: coff-z8k.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-z8k.o: coff-z8k.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/z8k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \ coffswap.h seclet.h -coff-we32k.o: coff-we32k.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-we32k.o: coff-we32k.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/we32k.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h \ coffswap.h seclet.h -coffgen.o: coffgen.c bfd.h libbfd.h $(INCDIR)/coff/internal.h \ +coffgen.o: coffgen.c $(BFD_H) libbfd.h $(INCDIR)/coff/internal.h \ libcoff.h -reloc16.o: reloc16.c bfd.h libbfd.h $(INCDIR)/coff/internal.h \ +reloc16.o: reloc16.c $(BFD_H) libbfd.h $(INCDIR)/coff/internal.h \ libcoff.h seclet.h -format.o : format.c bfd.h \ +format.o : format.c $(BFD_H) \ $(INCDIR)/obstack.h libbfd.h -section.o : section.c bfd.h \ +section.o : section.c $(BFD_H) \ $(INCDIR)/obstack.h libbfd.h -core.o : core.c bfd.h \ +core.o : core.c $(BFD_H) \ $(INCDIR)/obstack.h libbfd.h -syms.o : syms.c bfd.h \ +syms.o : syms.c $(BFD_H) \ $(INCDIR)/obstack.h libbfd.h syms.o : stab-syms.c -reloc.o : reloc.c bfd.h \ +reloc.o : reloc.c $(BFD_H) \ $(INCDIR)/obstack.h libbfd.h -trad-core.o : trad-core.c bfd.h $(INCDIR)/obstack.h \ +trad-core.o : trad-core.c $(BFD_H) $(INCDIR)/obstack.h \ libbfd.h libaout.h -coff-msym.o: coff-msym.c bfd.h $(INCDIR)/coff/ecoff-ext.h \ +coff-msym.o: coff-msym.c $(BFD_H) $(INCDIR)/coff/ecoff-ext.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h -newsos3.o : newsos3.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +newsos3.o : newsos3.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ $(INCDIR)/aout/ar.h libaout.h -i386lynx.o : i386lynx.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +i386lynx.o : i386lynx.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ $(INCDIR)/aout/ar.h libaout.h -i386aout.o : i386aout.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +i386aout.o : i386aout.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ $(INCDIR)/aout/ar.h libaout.h -i386linux.o : i386linux.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +i386linux.o : i386linux.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ $(INCDIR)/aout/ar.h libaout.h -i386bsd.o : i386bsd.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +i386bsd.o : i386bsd.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ $(INCDIR)/aout/ar.h libaout.h -bout.o : bout.c bfd.h $(INCDIR)/obstack.h libbfd.h \ +bout.o : bout.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h -mipsbsd.o : mipsbsd.c bfd.h $(INCDIR)/obstack.h \ +mipsbsd.o : mipsbsd.c $(BFD_H) $(INCDIR)/obstack.h \ libbfd.h libaout.h -elf.o : bfd.h $(INCDIR)/obstack.h -elf32.o : elf32.c elfcode.h libelf.h libbfd.h bfd.h \ +elf.o : $(BFD_H) $(INCDIR)/obstack.h +elf32.o : elf32.c elfcode.h libelf.h libbfd.h $(BFD_H) \ $(INCDIR)/obstack.h -elf32-sparc.o : elf32-sparc.c libelf.h libbfd.h bfd.h \ +elf32-sparc.o : elf32-sparc.c libelf.h libbfd.h $(BFD_H) \ $(INCDIR)/obstack.h -elf32-m68k.o : elf32-m68k.c libelf.h libbfd.h bfd.h \ +elf32-m68k.o : elf32-m68k.c libelf.h libbfd.h $(BFD_H) \ $(INCDIR)/obstack.h -elf32-i860.o : elf32-i860.c libelf.h libbfd.h bfd.h \ +elf32-i860.o : elf32-i860.c libelf.h libbfd.h $(BFD_H) \ $(INCDIR)/obstack.h -elf32-i386.o : elf32-i386.c libelf.h libbfd.h bfd.h \ +elf32-i386.o : elf32-i386.c libelf.h libbfd.h $(BFD_H) \ $(INCDIR)/obstack.h elf32-hppa.o : elf32-hppa.c $(srcdir)/elf32-hppa.h libelf.h libbfd.h \ - bfd.h $(INCDIR)/obstack.h -elf64.o : elf64.c elfcode.h libelf.h libbfd.h bfd.h \ + $(BFD_H) $(INCDIR)/obstack.h +elf64.o : elf64.c elfcode.h libelf.h libbfd.h $(BFD_H) \ $(INCDIR)/obstack.h # IF YOU PUT ANYTHING HERE IT WILL GO AWAY -- 2.30.2