* 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.
+2001-10-01 Alan Modra <amodra@bigpond.net.au>
+
+ * 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.
+
2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
Hans-Peter Nilsson <hp@bitrange.com>
Free Software Foundation, Inc.
Contributed by Cygnus Support.
-** NOTE: bfd.h and bfd-in2.h are GENERATED files. Don't change them;
-** instead, change bfd-in.h or the other BFD source files processed to
-** generate these files.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* bfd.h -- The only header file required by users of the bfd library
-
-The bfd.h file is generated from bfd-in.h and various .c files; if you
-change it, your changes will probably be lost.
-
-All the prototypes and definitions following the comment "THE FOLLOWING
-IS EXTRACTED FROM THE SOURCE" are extracted from the source files for
-BFD. If you change it, someone oneday will extract it from the source
-again, and your changes will be lost. To save yourself from this bind,
-change the definitions in the source in the bfd directory. Type "make
-docs" and then "make headers" in that directory, and magically this file
-will change to reflect your changes.
-
-If you don't have the tools to perform the extraction, then you are
-safe from someone on your system trampling over your header files.
-You should still maintain the equivalence between the source and this
-file though; every change you make to the .c file should be reflected
-here. */
-
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
+ "section.c", "archures.c", "reloc.c", "syms.c", "bfd.c", "archive.c",
+ "corefile.c", "targets.c" and "format.c".
+ Run "make headers" in your build bfd/ to regenerate. */
+
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
Free Software Foundation, Inc.
Contributed by Cygnus Support.
-** NOTE: bfd.h and bfd-in2.h are GENERATED files. Don't change them;
-** instead, change bfd-in.h or the other BFD source files processed to
-** generate these files.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* bfd.h -- The only header file required by users of the bfd library
-
-The bfd.h file is generated from bfd-in.h and various .c files; if you
-change it, your changes will probably be lost.
-
-All the prototypes and definitions following the comment "THE FOLLOWING
-IS EXTRACTED FROM THE SOURCE" are extracted from the source files for
-BFD. If you change it, someone oneday will extract it from the source
-again, and your changes will be lost. To save yourself from this bind,
-change the definitions in the source in the bfd directory. Type "make
-docs" and then "make headers" in that directory, and magically this file
-will change to reflect your changes.
-
-If you don't have the tools to perform the extraction, then you are
-safe from someone on your system trampling over your header files.
-You should still maintain the equivalence between the source and this
-file though; every change you make to the .c file should be reflected
-here. */
-
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
+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.
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 \
$(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
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
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.
--- /dev/null
+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. */\
+|
Free Software Foundation, Inc.
Written by Cygnus Support.
-** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
-** change libbfd-in.h or the other BFD source files processed to
-** generate this file.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "libbfd-in.h", "init.c", "libbfd.c", "cache.c",
+ "reloc.c", "archures.c" and "elf.c".
+ Run "make headers" in your build bfd/ to regenerate. */
+
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
Free Software Foundation, Inc.
Written by Cygnus Support.
-** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
-** change libbfd-in.h or the other BFD source files processed to
-** generate this file.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
Free Software Foundation, Inc.
Written by Cygnus Support.
-** NOTE: libcoff.h is a GENERATED file. Don't change it; instead,
-** change libcoff-in.h or coffcode.h.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "libcoff-in.h" and "coffcode.h".
+ Run "make headers" in your build bfd/ to regenerate. */
+
/* BFD COFF object file private structure.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
-** NOTE: libcoff.h is a GENERATED file. Don't change it; instead,
-** change libcoff-in.h or coffcode.h.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify