* [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