diff options
author | Alan Modra <amodra@gmail.com> | 2001-10-01 14:03:36 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-10-01 14:03:36 +0000 |
commit | 4eef72c77dd130eef2b5c5964831d77495c77d68 (patch) | |
tree | c93344f7359e22da4749582f51619263852952bd /bfd/doc | |
parent | 34105363c28a797bb220b3879e750876c772feca (diff) | |
download | gdb-4eef72c77dd130eef2b5c5964831d77495c77d68.zip gdb-4eef72c77dd130eef2b5c5964831d77495c77d68.tar.gz gdb-4eef72c77dd130eef2b5c5964831d77495c77d68.tar.bz2 |
bfd/
* bfd-in.h: Remove comments regarding generated files.
* libbfd-in.h: Likewise.
* libcoff-in.h: Likewise.
* bfd-in2.h: Regenerate.
* libbfd.h: Likewise.
* libcoff.h: Likewise.
bfd/doc/
* header.sed: New file, adds header to generated files.
* Makefile.am: Rewrite rules generating libbfd.h, libcoff.h and
bfd.h, using above. Add missing elf.c dependecy for libbfd.h.
* Makefile.in: Regenerate.
Diffstat (limited to 'bfd/doc')
-rw-r--r-- | bfd/doc/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/doc/Makefile.am | 72 | ||||
-rw-r--r-- | bfd/doc/Makefile.in | 123 | ||||
-rw-r--r-- | bfd/doc/header.sed | 12 |
4 files changed, 130 insertions, 84 deletions
diff --git a/bfd/doc/ChangeLog b/bfd/doc/ChangeLog index ca27ecc..f6f5160 100644 --- a/bfd/doc/ChangeLog +++ b/bfd/doc/ChangeLog @@ -1,3 +1,10 @@ +2001-10-01 Alan Modra <amodra@bigpond.net.au> + + * header.sed: New file, adds header to generated files. + * Makefile.am: Rewrite rules generating libbfd.h, libcoff.h and + bfd.h, using above. Add missing elf.c dependecy for libbfd.h. + * Makefile.in: Regenerate. + 2001-09-21 Alan Modra <amodra@bigpond.net.au> * Makefile.in: Regenerate. diff --git a/bfd/doc/Makefile.am b/bfd/doc/Makefile.am index 0d5268e..5fe4c23 100644 --- a/bfd/doc/Makefile.am +++ b/bfd/doc/Makefile.am @@ -183,30 +183,44 @@ s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str touch s-linker linker.texi: s-linker -libbfd.h: $(srcdir)/../libbfd-in.h \ +LIBBFD_H_DEP = $(srcdir)/../libbfd-in.h \ $(srcdir)/../init.c \ $(srcdir)/../libbfd.c \ $(srcdir)/../cache.c \ $(srcdir)/../reloc.c \ $(srcdir)/../archures.c \ + $(srcdir)/../elf.c \ + $(srcdir)/header.sed \ $(srcdir)/proto.str \ $(MKDOC) - cat $(srcdir)/../libbfd-in.h >libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../init.c >>libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../libbfd.c >>libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cache.c >>libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../reloc.c >>libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../archures.c >>libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elf.c >>libbfd.h - -libcoff.h: $(srcdir)/../libcoff-in.h \ + +libbfd.h: $(LIBBFD_H_DEP) + echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@ + for file in $(LIBBFD_H_DEP); do \ + case $$file in \ + *-in.h) cat $$file >> $@ ;; \ + */header.sed) break ;; \ + *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ + esac; \ + done + +LIBCOFF_H_DEP = $(srcdir)/../libcoff-in.h \ $(srcdir)/../coffcode.h \ + $(srcdir)/header.sed \ $(srcdir)/proto.str \ $(MKDOC) - cat $(srcdir)/../libcoff-in.h >libcoff.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../coffcode.h >>libcoff.h -bfd.h: $(srcdir)/../bfd-in.h \ +libcoff.h: $(LIBCOFF_H_DEP) + echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@ + for file in $(LIBCOFF_H_DEP); do \ + case $$file in \ + *-in.h) cat $$file >> $@ ;; \ + */header.sed) break ;; \ + *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ + esac; \ + done + +BFD_H_DEP = $(srcdir)/../bfd-in.h \ $(srcdir)/../init.c \ $(srcdir)/../opncls.c \ $(srcdir)/../libbfd.c \ @@ -219,25 +233,23 @@ bfd.h: $(srcdir)/../bfd-in.h \ $(srcdir)/../corefile.c \ $(srcdir)/../targets.c \ $(srcdir)/../format.c \ + $(srcdir)/header.sed \ $(srcdir)/proto.str \ $(MKDOC) - cat $(srcdir)/../bfd-in.h >bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h - echo "#ifdef __cplusplus" >>bfd.h - echo "}" >>bfd.h - echo "#endif" >>bfd.h - echo "#endif" >>bfd.h + +bfd.h: $(BFD_H_DEP) + echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@ + for file in $(BFD_H_DEP); do \ + case $$file in \ + *-in.h) cat $$file >> $@ ;; \ + */header.sed) break ;; \ + *) ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \ + esac; \ + done + echo "#ifdef __cplusplus" >> $@ + echo "}" >> $@ + echo "#endif" >> $@ + echo "#endif" >> $@ noinst_TEXINFOS = bfdint.texi diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in index a88832f..f7cfe2b 100644 --- a/bfd/doc/Makefile.in +++ b/bfd/doc/Makefile.in @@ -173,6 +173,43 @@ info_TEXINFOS = bfd.texinfo MKDOC = chew$(EXEEXT_FOR_BUILD) +LIBBFD_H_DEP = $(srcdir)/../libbfd-in.h \ + $(srcdir)/../init.c \ + $(srcdir)/../libbfd.c \ + $(srcdir)/../cache.c \ + $(srcdir)/../reloc.c \ + $(srcdir)/../archures.c \ + $(srcdir)/../elf.c \ + $(srcdir)/header.sed \ + $(srcdir)/proto.str \ + $(MKDOC) + + +LIBCOFF_H_DEP = $(srcdir)/../libcoff-in.h \ + $(srcdir)/../coffcode.h \ + $(srcdir)/header.sed \ + $(srcdir)/proto.str \ + $(MKDOC) + + +BFD_H_DEP = $(srcdir)/../bfd-in.h \ + $(srcdir)/../init.c \ + $(srcdir)/../opncls.c \ + $(srcdir)/../libbfd.c \ + $(srcdir)/../section.c \ + $(srcdir)/../archures.c \ + $(srcdir)/../reloc.c \ + $(srcdir)/../syms.c \ + $(srcdir)/../bfd.c \ + $(srcdir)/../archive.c \ + $(srcdir)/../corefile.c \ + $(srcdir)/../targets.c \ + $(srcdir)/../format.c \ + $(srcdir)/header.sed \ + $(srcdir)/proto.str \ + $(MKDOC) + + noinst_TEXINFOS = bfdint.texi MOSTLYCLEANFILES = $(MKDOC) *.o @@ -545,61 +582,39 @@ s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str touch s-linker linker.texi: s-linker -libbfd.h: $(srcdir)/../libbfd-in.h \ - $(srcdir)/../init.c \ - $(srcdir)/../libbfd.c \ - $(srcdir)/../cache.c \ - $(srcdir)/../reloc.c \ - $(srcdir)/../archures.c \ - $(srcdir)/proto.str \ - $(MKDOC) - cat $(srcdir)/../libbfd-in.h >libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../init.c >>libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../libbfd.c >>libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cache.c >>libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../reloc.c >>libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../archures.c >>libbfd.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elf.c >>libbfd.h - -libcoff.h: $(srcdir)/../libcoff-in.h \ - $(srcdir)/../coffcode.h \ - $(srcdir)/proto.str \ - $(MKDOC) - cat $(srcdir)/../libcoff-in.h >libcoff.h - ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../coffcode.h >>libcoff.h +libbfd.h: $(LIBBFD_H_DEP) + echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@ + for file in $(LIBBFD_H_DEP); do \ + case $$file in \ + *-in.h) cat $$file >> $@ ;; \ + */header.sed) break ;; \ + *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ + esac; \ + done -bfd.h: $(srcdir)/../bfd-in.h \ - $(srcdir)/../init.c \ - $(srcdir)/../opncls.c \ - $(srcdir)/../libbfd.c \ - $(srcdir)/../section.c \ - $(srcdir)/../archures.c \ - $(srcdir)/../reloc.c \ - $(srcdir)/../syms.c \ - $(srcdir)/../bfd.c \ - $(srcdir)/../archive.c \ - $(srcdir)/../corefile.c \ - $(srcdir)/../targets.c \ - $(srcdir)/../format.c \ - $(srcdir)/proto.str \ - $(MKDOC) - cat $(srcdir)/../bfd-in.h >bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h - ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h - echo "#ifdef __cplusplus" >>bfd.h - echo "}" >>bfd.h - echo "#endif" >>bfd.h - echo "#endif" >>bfd.h +libcoff.h: $(LIBCOFF_H_DEP) + echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@ + for file in $(LIBCOFF_H_DEP); do \ + case $$file in \ + *-in.h) cat $$file >> $@ ;; \ + */header.sed) break ;; \ + *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \ + esac; \ + done + +bfd.h: $(BFD_H_DEP) + echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@ + for file in $(BFD_H_DEP); do \ + case $$file in \ + *-in.h) cat $$file >> $@ ;; \ + */header.sed) break ;; \ + *) ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \ + esac; \ + done + echo "#ifdef __cplusplus" >> $@ + echo "}" >> $@ + echo "#endif" >> $@ + echo "#endif" >> $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/bfd/doc/header.sed b/bfd/doc/header.sed new file mode 100644 index 0000000..ed27040 --- /dev/null +++ b/bfd/doc/header.sed @@ -0,0 +1,12 @@ +s|\(.*\) [^ ]*header.sed.*|\1| +s|[^ ]*/||g +s|^ *|"| +s| |", "|g +s|$|"| +s|, \([^ ]*\)$| and \1| +s|^|/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically generated from | +s|\(.\{60\}[^ ]* \)|\1\ + |g +s|$|.\ + Run "make headers" in your build bfd/ to regenerate. */\ +| |