public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/3] bfd: replace doc header generation with pattern rules
@ 2021-12-20  7:16 Mike Frysinger
  2021-12-20  7:16 ` [PATCH 2/3] bfd: rename core.texi to corefile.texi Mike Frysinger
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mike Frysinger @ 2021-12-20  7:16 UTC (permalink / raw)
  To: binutils

This unifies boilerplate rules for most files with pattern rules.
---
 bfd/doc/Makefile.am | 83 +++------------------------------------------
 bfd/doc/Makefile.in | 83 +++------------------------------------------
 2 files changed, 10 insertions(+), 156 deletions(-)

diff --git a/bfd/doc/Makefile.am b/bfd/doc/Makefile.am
index 0aa8af3445a6..787eb27db92d 100644
--- a/bfd/doc/Makefile.am
+++ b/bfd/doc/Makefile.am
@@ -96,96 +96,23 @@ REGEN_TEXI = \
 	touch $@; \
 	)
 
-aoutx.texi: aoutx.stamp ; @true
-aoutx.stamp: $(srcdir)/../aoutx.h $(srcdir)/doc.str $(MKDOC)
+%.texi: %.stamp ; @true
+%.stamp: $(srcdir)/../%.h $(srcdir)/doc.str $(MKDOC)
 	$(AM_V_GEN)$(REGEN_TEXI)
-
-archive.texi: archive.stamp ; @true
-archive.stamp: $(srcdir)/../archive.c $(srcdir)/doc.str $(MKDOC)
+%.stamp: $(srcdir)/../%.c $(srcdir)/doc.str $(MKDOC)
 	$(AM_V_GEN)$(REGEN_TEXI)
 
-archures.texi: archures.stamp ; @true
-archures.stamp: $(srcdir)/../archures.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
+# Avoid the %.stamp generating a builddir/bfd.texi that overrides the srcdir/.
+bfd.stamp: ; @touch $@
 
 # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
 # bfd.texi on an 8.3 filesystem.
-bfdt.texi: bfdt.stamp ; @true
 bfdt.stamp: $(srcdir)/../bfd.c $(srcdir)/doc.str $(MKDOC)
 	$(AM_V_GEN)$(REGEN_TEXI)
 
-cache.texi: cache.stamp ; @true
-cache.stamp: $(srcdir)/../cache.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-coffcode.texi: coffcode.stamp ; @true
-coffcode.stamp: $(srcdir)/../coffcode.h $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-core.texi: core.stamp ; @true
 core.stamp: $(srcdir)/../corefile.c $(srcdir)/doc.str $(MKDOC)
 	$(AM_V_GEN)$(REGEN_TEXI)
 
-elf.texi: elf.stamp ; @true
-elf.stamp: $(srcdir)/../elf.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-elfcode.texi: elfcode.stamp ; @true
-elfcode.stamp: $(srcdir)/../elfcode.h $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-mmo.texi: mmo.stamp ; @true
-mmo.stamp: $(srcdir)/../mmo.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-format.texi: format.stamp ; @true
-format.stamp: $(srcdir)/../format.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-libbfd.texi: libbfd.stamp ; @true
-libbfd.stamp: $(srcdir)/../libbfd.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-bfdio.texi: bfdio.stamp ; @true
-bfdio.stamp: $(srcdir)/../bfdio.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-bfdwin.texi: bfdwin.stamp ; @true
-bfdwin.stamp: $(srcdir)/../bfdwin.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-opncls.texi: opncls.stamp ; @true
-opncls.stamp: $(srcdir)/../opncls.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-reloc.texi: reloc.stamp ; @true
-reloc.stamp: $(srcdir)/../reloc.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-section.texi: section.stamp ; @true
-section.stamp: $(srcdir)/../section.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-syms.texi: syms.stamp ; @true
-syms.stamp: $(srcdir)/../syms.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-targets.texi: targets.stamp ; @true
-targets.stamp: $(srcdir)/../targets.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-init.texi: init.stamp ; @true
-init.stamp: $(srcdir)/../init.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-hash.texi: hash.stamp ; @true
-hash.stamp: $(srcdir)/../hash.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-linker.texi: linker.stamp ; @true
-linker.stamp: $(srcdir)/../linker.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
 bfdver.texi: $(srcdir)/Makefile.in
 	@echo "creating $@"; \
 	echo "@set VERSION $(VERSION)" > bfdver.texi; \
-- 
2.33.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/3] bfd: rename core.texi to corefile.texi
  2021-12-20  7:16 [PATCH 1/3] bfd: replace doc header generation with pattern rules Mike Frysinger
@ 2021-12-20  7:16 ` Mike Frysinger
  2022-01-22 14:38   ` Nick Clifton
  2021-12-20  7:16 ` [PATCH 3/3] bfd: merge doc subdir up a level Mike Frysinger
  2022-01-22 14:37 ` [PATCH 1/3] bfd: replace doc header generation with pattern rules Nick Clifton
  2 siblings, 1 reply; 8+ messages in thread
From: Mike Frysinger @ 2021-12-20  7:16 UTC (permalink / raw)
  To: binutils

This is a generated file name from a correspondingly named C file.
Rename it to avoid unique build rules since there's no difference
to the generated manual.
---
 bfd/.gitignore      | 2 +-
 bfd/doc/Makefile.am | 5 +----
 bfd/doc/Makefile.in | 5 +----
 bfd/doc/bfd.texi    | 2 +-
 4 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/bfd/.gitignore b/bfd/.gitignore
index d4f7423111e5..065ed99f3a89 100644
--- a/bfd/.gitignore
+++ b/bfd/.gitignore
@@ -24,7 +24,7 @@
 /doc/cache.texi
 /doc/chew
 /doc/coffcode.texi
-/doc/core.texi
+/doc/corefile.texi
 /doc/elf.texi
 /doc/elfcode.texi
 /doc/format.texi
diff --git a/bfd/doc/Makefile.am b/bfd/doc/Makefile.am
index 787eb27db92d..473e9e6fc71f 100644
--- a/bfd/doc/Makefile.am
+++ b/bfd/doc/Makefile.am
@@ -21,7 +21,7 @@ AUTOMAKE_OPTIONS = info-in-builddir no-texinfo.tex foreign
 
 DOCFILES = aoutx.texi  archive.texi archures.texi \
 	bfdt.texi  cache.texi coffcode.texi \
-	core.texi elf.texi elfcode.texi  format.texi \
+	corefile.texi elf.texi elfcode.texi  format.texi \
 	libbfd.texi bfdwin.texi bfdio.texi \
 	opncls.texi  reloc.texi  section.texi  \
 	syms.texi  targets.texi init.texi hash.texi linker.texi \
@@ -110,9 +110,6 @@ bfd.stamp: ; @touch $@
 bfdt.stamp: $(srcdir)/../bfd.c $(srcdir)/doc.str $(MKDOC)
 	$(AM_V_GEN)$(REGEN_TEXI)
 
-core.stamp: $(srcdir)/../corefile.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
 bfdver.texi: $(srcdir)/Makefile.in
 	@echo "creating $@"; \
 	echo "@set VERSION $(VERSION)" > bfdver.texi; \
diff --git a/bfd/doc/bfd.texi b/bfd/doc/bfd.texi
index 6f66dee7f304..4409b563095e 100644
--- a/bfd/doc/bfd.texi
+++ b/bfd/doc/bfd.texi
@@ -261,7 +261,7 @@ structures.
 @include  reloc.texi
 
 @node Core Files, Targets, Relocations, BFD front end
-@include  core.texi
+@include  corefile.texi
 
 @node Targets, Architectures, Core Files, BFD front end
 @include  targets.texi
-- 
2.33.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/3] bfd: merge doc subdir up a level
  2021-12-20  7:16 [PATCH 1/3] bfd: replace doc header generation with pattern rules Mike Frysinger
  2021-12-20  7:16 ` [PATCH 2/3] bfd: rename core.texi to corefile.texi Mike Frysinger
@ 2021-12-20  7:16 ` Mike Frysinger
  2022-01-22 14:39   ` Nick Clifton
  2022-01-22 14:37 ` [PATCH 1/3] bfd: replace doc header generation with pattern rules Nick Clifton
  2 siblings, 1 reply; 8+ messages in thread
From: Mike Frysinger @ 2021-12-20  7:16 UTC (permalink / raw)
  To: binutils

This avoids a recursive make into the doc subdir and speeds up the
build slightly.  It also allows for more parallelism
---
 bfd/Makefile.am     |  22 +-
 bfd/Makefile.in     | 530 ++++++++++++++++++++++---
 bfd/configure       |   4 +-
 bfd/configure.ac    |   3 +-
 bfd/doc/Makefile.am | 141 -------
 bfd/doc/Makefile.in | 943 --------------------------------------------
 bfd/doc/local.mk    | 155 ++++++++
 7 files changed, 644 insertions(+), 1154 deletions(-)
 delete mode 100644 bfd/doc/Makefile.am
 delete mode 100644 bfd/doc/Makefile.in
 create mode 100644 bfd/doc/local.mk

diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 4960cb500b18..ffe9eed55337 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -17,13 +17,18 @@
 # <http://www.gnu.org/licenses/>.
 #
 
-AUTOMAKE_OPTIONS = no-dist foreign
+AUTOMAKE_OPTIONS = no-dist foreign info-in-builddir no-texinfo.tex
 ACLOCAL_AMFLAGS = -I . -I .. -I ../config
 
+MOSTLYCLEANFILES =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
 INCDIR = $(srcdir)/../include
 CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
 
-SUBDIRS = doc po
+SUBDIRS = po
 
 bfddocdir = doc
 
@@ -920,11 +925,6 @@ LIBBFD_H_FILES = libbfd-in.h libbfd.c bfdio.c bfdwin.c \
 	cache.c reloc.c archures.c linker.c
 LIBCOFF_H_FILES = libcoff-in.h coffcode.h
 
-MKDOC = doc/chew$(EXEEXT_FOR_BUILD)
-
-$(MKDOC):
-	cd $(bfddocdir) && $(MAKE) chew$(EXEEXT_FOR_BUILD)
-
 headers: stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
 
 # We only rebuild the header files automatically if we have been
@@ -967,12 +967,12 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) $(MKDOC)
 	$(AM_V_at)$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
 	$(AM_V_at)touch stmp-lcoff-h
 
-MOSTLYCLEANFILES = ofiles stamp-ofiles
+MOSTLYCLEANFILES += ofiles stamp-ofiles
 
-CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
+CLEANFILES += bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
 	stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
 
-DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion
+DISTCLEANFILES += $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion
 
 bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
 	$(AM_V_GEN)\
@@ -1009,3 +1009,5 @@ coff-tic54x.lo: coff-tic54x.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC)$(LTCOMPILE) -c -o $@ $< $(NO_WERROR)
+
+include doc/local.mk
diff --git a/bfd/configure.ac b/bfd/configure.ac
index a578c3a019e5..09dbe40ccb7e 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -1104,8 +1104,7 @@ case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
   true+yes )  AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;;
 esac
 
-rm -f doc/config.status
-AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in])
+AC_CONFIG_FILES([Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in])
 
 dnl We need this duplication, even though we use AM_PO_SUBDIRS, because of
 dnl our two separate POTFILES.  Yuck.
diff --git a/bfd/doc/Makefile.am b/bfd/doc/Makefile.am
deleted file mode 100644
index 473e9e6fc71f..000000000000
--- a/bfd/doc/Makefile.am
+++ /dev/null
@@ -1,141 +0,0 @@
-## Process this file with automake to generate Makefile.in
-#
-#   Copyright (C) 2012-2021 Free Software Foundation, Inc.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-# 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING3.  If not see
-# <http://www.gnu.org/licenses/>.
-#
-
-AUTOMAKE_OPTIONS = info-in-builddir no-texinfo.tex foreign
-
-DOCFILES = aoutx.texi  archive.texi archures.texi \
-	bfdt.texi  cache.texi coffcode.texi \
-	corefile.texi elf.texi elfcode.texi  format.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 \
-	bfdver.texi
-
-# SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction 
-# between VPATH and suffix rules.  If you use GNU Make, perhaps other Makes,
-# you don't need these three:
-SRCDOC = $(srcdir)/../aoutx.h  $(srcdir)/../archive.c \
-	$(srcdir)/../archures.c $(srcdir)/../bfd.c \
-	$(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
-	$(srcdir)/../cache.c $(srcdir)/../coffcode.h \
-	$(srcdir)/../corefile.c $(srcdir)/../elf.c \
-	$(srcdir)/../elfcode.h  $(srcdir)/../format.c \
-	$(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
-	$(srcdir)/../reloc.c  $(srcdir)/../section.c \
-	$(srcdir)/../syms.c  $(srcdir)/../targets.c \
-	$(srcdir)/../hash.c $(srcdir)/../linker.c \
-	$(srcdir)/../mmo.c
-
-SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
-	$(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
-	$(srcdir)/../format.c $(srcdir)/../libbfd.c \
-	$(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
-	$(srcdir)/../opncls.c $(srcdir)/../reloc.c \
-	$(srcdir)/../section.c $(srcdir)/../syms.c \
-	$(srcdir)/../targets.c $(srcdir)/../init.c
-
-SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
-	$(srcdir)/../bfdio.c $(srcdir)/../bfdwin.c \
-	$(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
-	$(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
-	$(srcdir)/../init.c
-
-TEXIDIR = $(srcdir)/../../texinfo/fsf
-
-info_TEXINFOS = bfd.texi
-bfd_TEXINFOS = $(DOCFILES) bfdsumm.texi
-
-AM_MAKEINFOFLAGS = --no-split
-
-MKDOC = chew$(EXEEXT_FOR_BUILD)
-
-AM_CPPFLAGS = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
-	-I$(srcdir)/../../intl -I../../intl
-
-$(MKDOC): chew.stamp ; @true
-chew.stamp: $(srcdir)/chew.c
-	$(CC_FOR_BUILD) -o chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
-	  $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \
-	$(SHELL) $(srcdir)/../../move-if-change \
-	  chw$$$$$(EXEEXT_FOR_BUILD) $(MKDOC); \
-	touch $@
-
-# We can't replace these rules with an implicit rule, because
-# makes without VPATH support couldn't find the .h files in `..'.
-
-# We do not depend on chew directly so that we can distribute the info
-# files, and permit people to rebuild them, without requiring the makeinfo
-# program.  If somebody tries to rebuild info, but none of the .texi files
-# have changed, then nothing will be rebuilt.
-
-REGEN_TEXI = \
-	( \
-	set -e; \
-	./$(MKDOC) -f $(srcdir)/doc.str < $< > $@.tmp; \
-	texi=$@; \
-	texi=$${texi%.stamp}.texi; \
-	test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi .; \
-	$(SHELL) $(srcdir)/../../move-if-change $@.tmp $$texi; \
-	touch $@; \
-	)
-
-%.texi: %.stamp ; @true
-%.stamp: $(srcdir)/../%.h $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-%.stamp: $(srcdir)/../%.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-# Avoid the %.stamp generating a builddir/bfd.texi that overrides the srcdir/.
-bfd.stamp: ; @touch $@
-
-# We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
-# bfd.texi on an 8.3 filesystem.
-bfdt.stamp: $(srcdir)/../bfd.c $(srcdir)/doc.str $(MKDOC)
-	$(AM_V_GEN)$(REGEN_TEXI)
-
-bfdver.texi: $(srcdir)/Makefile.in
-	@echo "creating $@"; \
-	echo "@set VERSION $(VERSION)" > bfdver.texi; \
-	if test -n "$(PKGVERSION)"; then \
-	  echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \
-	fi; \
-	echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \
-	if test -n "$(REPORT_BUGS_TEXI)"; then \
-	  echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \
-	fi
-
-noinst_TEXINFOS = bfdint.texi
-
-MOSTLYCLEANFILES = $(MKDOC) *.o *.stamp
-
-DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
-
-MAINTAINERCLEANFILES = $(DOCFILES)
-
-# We want install to imply install-info as per GNU standards, despite the
-# cygnus option.
-install: install-info
-
-html-local: bfd/index.html
-bfd/index.html: bfd.texi $(bfd_TEXINFOS)
-	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
-	  --split=node -I$(srcdir) $(srcdir)/bfd.texi
-
-MAINTAINERCLEANFILES += bfd.info
diff --git a/bfd/doc/local.mk b/bfd/doc/local.mk
new file mode 100644
index 000000000000..3b5c8d37d0f2
--- /dev/null
+++ b/bfd/doc/local.mk
@@ -0,0 +1,155 @@
+## Process this file with automake to generate Makefile.in
+#
+#   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+#
+
+DOCFILES = \
+	%D%/aoutx.texi \
+	%D%/archive.texi \
+	%D%/archures.texi \
+	%D%/bfdio.texi \
+	%D%/bfdt.texi \
+	%D%/bfdver.texi \
+	%D%/bfdwin.texi \
+	%D%/cache.texi \
+	%D%/coffcode.texi \
+	%D%/corefile.texi \
+	%D%/elfcode.texi \
+	%D%/elf.texi \
+	%D%/format.texi \
+	%D%/hash.texi \
+	%D%/init.texi \
+	%D%/libbfd.texi \
+	%D%/linker.texi \
+	%D%/mmo.texi \
+	%D%/opncls.texi \
+	%D%/reloc.texi \
+	%D%/section.texi \
+	%D%/syms.texi \
+	%D%/targets.texi
+
+# SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction
+# between VPATH and suffix rules.  If you use GNU Make, perhaps other Makes,
+# you don't need these three:
+SRCDOC = \
+	$(srcdir)/aoutx.h $(srcdir)/archive.c \
+	$(srcdir)/archures.c $(srcdir)/bfd.c \
+	$(srcdir)/bfdio.c $(srcdir)/bfdwin.c \
+	$(srcdir)/cache.c $(srcdir)/coffcode.h \
+	$(srcdir)/corefile.c $(srcdir)/elf.c \
+	$(srcdir)/elfcode.h $(srcdir)/format.c \
+	$(srcdir)/libbfd.c $(srcdir)/opncls.c \
+	$(srcdir)/reloc.c $(srcdir)/section.c \
+	$(srcdir)/syms.c $(srcdir)/targets.c \
+	$(srcdir)/hash.c $(srcdir)/linker.c \
+	$(srcdir)/mmo.c
+
+SRCPROT = $(srcdir)/archive.c $(srcdir)/archures.c \
+	$(srcdir)/bfd.c $(srcdir)/coffcode.h $(srcdir)/corefile.c \
+	$(srcdir)/format.c $(srcdir)/libbfd.c \
+	$(srcdir)/bfdio.c $(srcdir)/bfdwin.c \
+	$(srcdir)/opncls.c $(srcdir)/reloc.c \
+	$(srcdir)/section.c $(srcdir)/syms.c \
+	$(srcdir)/targets.c $(srcdir)/init.c
+
+SRCIPROT = $(srcdir)/cache.c $(srcdir)/libbfd.c \
+	$(srcdir)/bfdio.c $(srcdir)/bfdwin.c \
+	$(srcdir)/reloc.c $(srcdir)/cpu-h8300.c \
+	$(srcdir)/cpu-i960.c $(srcdir)/archures.c \
+	$(srcdir)/init.c
+
+TEXIDIR = $(srcdir)/../texinfo/fsf
+
+info_TEXINFOS = %D%/bfd.texi
+%C%_bfd_TEXINFOS = $(DOCFILES) %D%/bfdsumm.texi
+
+AM_MAKEINFOFLAGS = --no-split
+
+MKDOC = %D%/chew$(EXEEXT_FOR_BUILD)
+
+$(MKDOC): %D%/chew.stamp ; @true
+%D%/chew.stamp: $(srcdir)/%D%/chew.c %D%/$(am__dirstamp)
+	$(AM_V_CCLD)$(CC_FOR_BUILD) -o %D%/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
+	  $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \
+	  -I. -I$(srcdir) -I%D% -I$(srcdir)/../include -I$(srcdir)/../intl -I../intl \
+	  $(srcdir)/%D%/chew.c && \
+	$(SHELL) $(srcdir)/../move-if-change \
+	  %D%/chw$$$$$(EXEEXT_FOR_BUILD) $(MKDOC) && \
+	touch $@
+
+# We can't replace these rules with an implicit rule, because
+# makes without VPATH support couldn't find the .h files in `..'.
+
+# We do not depend on chew directly so that we can distribute the info
+# files, and permit people to rebuild them, without requiring the makeinfo
+# program.  If somebody tries to rebuild info, but none of the .texi files
+# have changed, then nothing will be rebuilt.
+
+REGEN_TEXI = \
+	( \
+	set -e; \
+	$(MKDOC) -f $(srcdir)/%D%/doc.str < $< > $@.tmp; \
+	texi=$@; \
+	texi=$${texi%.stamp}.texi; \
+	test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi .; \
+	$(SHELL) $(srcdir)/../move-if-change $@.tmp $$texi; \
+	touch $@; \
+	)
+
+%D%/%.texi: %D%/%.stamp ; @true
+%D%/%.stamp: $(srcdir)/%.h $(srcdir)/%D%/doc.str $(MKDOC) %D%/$(am__dirstamp)
+	$(AM_V_GEN)$(REGEN_TEXI)
+%D%/%.stamp: $(srcdir)/%.c $(srcdir)/%D%/doc.str $(MKDOC) %D%/$(am__dirstamp)
+	$(AM_V_GEN)$(REGEN_TEXI)
+
+# Avoid the %.stamp generating a builddir/bfd.texi that overrides the srcdir/.
+%D%/bfd.stamp: %D%/$(am__dirstamp) ; @touch $@
+
+# We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
+# bfd.texi on an 8.3 filesystem.
+%D%/bfdt.stamp: $(srcdir)/bfd.c $(srcdir)/%D%/doc.str $(MKDOC) %D%/$(am__dirstamp)
+	$(AM_V_GEN)$(REGEN_TEXI)
+
+%D%/bfdver.texi: $(srcdir)/Makefile.in
+	$(AM_V_GEN)\
+	echo "@set VERSION $(VERSION)" > bfdver.texi; \
+	if test -n "$(PKGVERSION)"; then \
+	  echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \
+	fi; \
+	echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \
+	if test -n "$(REPORT_BUGS_TEXI)"; then \
+	  echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \
+	fi
+
+noinst_TEXINFOS = %D%/bfdint.texi
+
+MOSTLYCLEANFILES += $(MKDOC) %D%/*.o %D%/*.stamp
+
+DISTCLEANFILES += %D%/bfd.?? %D%/bfd.??? texput.log
+
+MAINTAINERCLEANFILES += $(DOCFILES)
+
+# We want install to imply install-info as per GNU standards, despite the
+# cygnus option.
+install: install-info
+
+html-local: %D%/bfd/index.html
+%D%/bfd/index.html: %D%/bfd.texi $(bfd_TEXINFOS) %D%/$(am__dirstamp)
+	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	  --split=node -I$(srcdir) -o %D%/bfd $(srcdir)/bfd.texi
+
+MAINTAINERCLEANFILES += %D%/bfd.info
-- 
2.33.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] bfd: replace doc header generation with pattern rules
  2021-12-20  7:16 [PATCH 1/3] bfd: replace doc header generation with pattern rules Mike Frysinger
  2021-12-20  7:16 ` [PATCH 2/3] bfd: rename core.texi to corefile.texi Mike Frysinger
  2021-12-20  7:16 ` [PATCH 3/3] bfd: merge doc subdir up a level Mike Frysinger
@ 2022-01-22 14:37 ` Nick Clifton
  2 siblings, 0 replies; 8+ messages in thread
From: Nick Clifton @ 2022-01-22 14:37 UTC (permalink / raw)
  To: Mike Frysinger, binutils

Hi Mike,

> This unifies boilerplate rules for most files with pattern rules.

Sorry - I missed this patch series. :-(

>   bfd/doc/Makefile.am | 83 +++------------------------------------------
>   bfd/doc/Makefile.in | 83 +++------------------------------------------
>   2 files changed, 10 insertions(+), 156 deletions(-)

Approved - please apply.  (Mainline only - no need to risk changing the new 2.38 branch...)

Cheers
   Nick



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] bfd: rename core.texi to corefile.texi
  2021-12-20  7:16 ` [PATCH 2/3] bfd: rename core.texi to corefile.texi Mike Frysinger
@ 2022-01-22 14:38   ` Nick Clifton
  0 siblings, 0 replies; 8+ messages in thread
From: Nick Clifton @ 2022-01-22 14:38 UTC (permalink / raw)
  To: Mike Frysinger, binutils

Hi Mike,

> This is a generated file name from a correspondingly named C file.
> Rename it to avoid unique build rules since there's no difference
> to the generated manual.
> ---
>   bfd/.gitignore      | 2 +-
>   bfd/doc/Makefile.am | 5 +----
>   bfd/doc/Makefile.in | 5 +----
>   bfd/doc/bfd.texi    | 2 +-

Approved - please apply (mainline).

Cheers
   Nick


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] bfd: merge doc subdir up a level
  2021-12-20  7:16 ` [PATCH 3/3] bfd: merge doc subdir up a level Mike Frysinger
@ 2022-01-22 14:39   ` Nick Clifton
  2022-01-23 15:05     ` H.J. Lu
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Clifton @ 2022-01-22 14:39 UTC (permalink / raw)
  To: Mike Frysinger, binutils

Hi Mike,

> This avoids a recursive make into the doc subdir and speeds up the
> build slightly.  It also allows for more parallelism
> ---
>   bfd/Makefile.am     |  22 +-
>   bfd/Makefile.in     | 530 ++++++++++++++++++++++---
>   bfd/configure       |   4 +-
>   bfd/configure.ac    |   3 +-
>   bfd/doc/Makefile.am | 141 -------
>   bfd/doc/Makefile.in | 943 --------------------------------------------
>   bfd/doc/local.mk    | 155 ++++++++

Approved - please apply (mainline only)

Cheers
   Nick


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] bfd: merge doc subdir up a level
  2022-01-22 14:39   ` Nick Clifton
@ 2022-01-23 15:05     ` H.J. Lu
  2022-01-23 19:38       ` Mike Frysinger
  0 siblings, 1 reply; 8+ messages in thread
From: H.J. Lu @ 2022-01-23 15:05 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Mike Frysinger, Binutils

On Sat, Jan 22, 2022 at 6:40 AM Nick Clifton via Binutils
<binutils@sourceware.org> wrote:
>
> Hi Mike,
>
> > This avoids a recursive make into the doc subdir and speeds up the
> > build slightly.  It also allows for more parallelism
> > ---
> >   bfd/Makefile.am     |  22 +-
> >   bfd/Makefile.in     | 530 ++++++++++++++++++++++---
> >   bfd/configure       |   4 +-
> >   bfd/configure.ac    |   3 +-
> >   bfd/doc/Makefile.am | 141 -------
> >   bfd/doc/Makefile.in | 943 --------------------------------------------
> >   bfd/doc/local.mk    | 155 ++++++++
>
> Approved - please apply (mainline only)

This caused:

https://sourceware.org/bugzilla/show_bug.cgi?id=28807

-- 
H.J.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] bfd: merge doc subdir up a level
  2022-01-23 15:05     ` H.J. Lu
@ 2022-01-23 19:38       ` Mike Frysinger
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2022-01-23 19:38 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Nick Clifton, Binutils

[-- Attachment #1: Type: text/plain, Size: 868 bytes --]

On 23 Jan 2022 07:05, H.J. Lu wrote:
> On Sat, Jan 22, 2022 at 6:40 AM Nick Clifton wrote:
> > > This avoids a recursive make into the doc subdir and speeds up the
> > > build slightly.  It also allows for more parallelism
> > > ---
> > >   bfd/Makefile.am     |  22 +-
> > >   bfd/Makefile.in     | 530 ++++++++++++++++++++++---
> > >   bfd/configure       |   4 +-
> > >   bfd/configure.ac    |   3 +-
> > >   bfd/doc/Makefile.am | 141 -------
> > >   bfd/doc/Makefile.in | 943 --------------------------------------------
> > >   bfd/doc/local.mk    | 155 ++++++++
> >
> > Approved - please apply (mainline only)
> 
> This caused:
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=28807

looks like you found & fixed the issue -- stale cygnus hack.  thanks!

i sent some follow up fixes for other old cygnus hacks still in the tree.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-23 19:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20  7:16 [PATCH 1/3] bfd: replace doc header generation with pattern rules Mike Frysinger
2021-12-20  7:16 ` [PATCH 2/3] bfd: rename core.texi to corefile.texi Mike Frysinger
2022-01-22 14:38   ` Nick Clifton
2021-12-20  7:16 ` [PATCH 3/3] bfd: merge doc subdir up a level Mike Frysinger
2022-01-22 14:39   ` Nick Clifton
2022-01-23 15:05     ` H.J. Lu
2022-01-23 19:38       ` Mike Frysinger
2022-01-22 14:37 ` [PATCH 1/3] bfd: replace doc header generation with pattern rules Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).