* elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound
[binutils-gdb.git] / bfd / doc / Makefile.am
index fa96b39ac6bc74dff8a120e776f15a86be8899cf..7476ee5bab710b6b418072124b473cf0d340b247 100644 (file)
@@ -8,7 +8,8 @@ DOCFILES = aoutx.texi  archive.texi archures.texi \
        libbfd.texi bfdwin.texi bfdio.texi \
        opncls.texi  reloc.texi  section.texi  \
        syms.texi  targets.texi init.texi hash.texi linker.texi \
-       mmo.texi
+       mmo.texi \
+       bfdver.texi
 
 PROTOS = archive.p archures.p bfd.p \
         core.p format.p \
@@ -51,22 +52,20 @@ SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
 TEXIDIR = $(srcdir)/../../texinfo/fsf
 
 info_TEXINFOS = bfd.texinfo
+bfd_TEXINFOS = $(DOCFILES) bfdsumm.texi
 
 MKDOC = chew$(EXEEXT_FOR_BUILD)
 
-INCLUDES = -D_GNU_SOURCE -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
+AM_CPPFLAGS = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
        -I$(srcdir)/../../intl -I../../intl
 
-$(MKDOC): chew.o
-       $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
-
-chew.o: chew.c
-       $(CC_FOR_BUILD) -c $(INCLUDES) $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
+$(MKDOC): $(srcdir)/chew.c
+       $(CC_FOR_BUILD) -o chew.$$$$ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \
+         $(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \
+       $(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
 
 protos: libbfd.h libcoff.h bfd.h
 
-$(srcdir)/bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
-
 # We can't replace these rules with an implicit rule, because
 # makes without VPATH support couldn't find the .h files in `..'.
 
@@ -250,6 +249,7 @@ BFD_H_DEP = \
        $(srcdir)/../format.c           \
        $(srcdir)/../linker.c           \
        $(srcdir)/../simple.c           \
+       $(srcdir)/../compress.c         \
        $(srcdir)/header.sed            \
        $(srcdir)/proto.str             \
        $(srcdir)/../version.h          \
@@ -271,6 +271,17 @@ bfd.h: $(BFD_H_DEP)
        echo "#endif" >> $@
        echo "#endif" >> $@
 
+bfdver.texi: $(srcdir)/Makefile.in
+       @echo "creating $@"; \
+       echo "@set VERSION $(VERSION)" > bfdver.texi; \
+       if [ -n "$(PKGVERSION)" ]; then \
+         echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \
+       fi; \
+       echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \
+       if [ -n "$(REPORT_BUGS_TEXI)" ]; then \
+         echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \
+       fi
+
 noinst_TEXINFOS = bfdint.texi
 
 MOSTLYCLEANFILES = $(MKDOC) *.o
@@ -284,3 +295,12 @@ MAINTAINERCLEANFILES = $(DOCFILES)
 # We want install to imply install-info as per GNU standards, despite the
 # cygnus option.
 install: install-info
+
+MAINTAINERCLEANFILES += bfd.info
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES += bfd.info
+endif