[2/3] support generating multi-html pages in parallel

Message ID 20210502170743.6488-2-vapier@gentoo.org
State New
Headers show
Series
  • [1/3] generate single html manual page by default
Related show

Commit Message

Alan Modra via Binutils May 2, 2021, 5:07 p.m.
Use the pattern from other projects where we generate the html pages
in a dir named the same as the project.  So now we have:
gas/doc/gas.html - single html page
gas/doc/gas/ - multiple html pages

This works for projects that have a doc/ subdir already, but gprof &
ld require a little tweaking since they generate their docs in their
respective toplevels.
---
 bfd/doc/Makefile.am      |  5 +++++
 bfd/doc/Makefile.in      | 19 ++++++++++++-------
 binutils/doc/Makefile.am |  5 +++++
 binutils/doc/Makefile.in |  9 +++++++--
 gas/doc/Makefile.am      |  5 +++++
 gas/doc/Makefile.in      |  9 +++++++--
 gprof/Makefile.am        |  6 ++++++
 gprof/Makefile.in        | 24 +++++++++++++++---------
 ld/Makefile.am           |  6 ++++++
 ld/Makefile.in           | 20 +++++++++++++-------
 10 files changed, 81 insertions(+), 27 deletions(-)

-- 
2.31.1

Comments

Alan Modra via Binutils May 7, 2021, 12:40 p.m. | #1
Hi Mike,

> Use the pattern from other projects where we generate the html pages

> in a dir named the same as the project.  So now we have:

> gas/doc/gas.html - single html page

> gas/doc/gas/ - multiple html pages


Patch approved - please apply.

Cheers
   Nick

Patch

diff --git a/bfd/doc/Makefile.am b/bfd/doc/Makefile.am
index 480e65f8507d..5f22bf552b22 100644
--- a/bfd/doc/Makefile.am
+++ b/bfd/doc/Makefile.am
@@ -370,4 +370,9 @@  MAINTAINERCLEANFILES = $(DOCFILES)
 # 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/Makefile.in b/bfd/doc/Makefile.in
index 11409b2cab11..8ae233dc8346 100644
--- a/bfd/doc/Makefile.in
+++ b/bfd/doc/Makefile.in
@@ -766,7 +766,7 @@  dvi-am: $(DVIS)
 
 html: html-am
 
-html-am: $(HTMLS)
+html-am: $(HTMLS) html-local
 
 info: info-am
 
@@ -917,12 +917,12 @@  uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
 .PHONY: all all-am check check-am clean clean-aminfo clean-generic \
 	clean-libtool cscopelist-am ctags-am dist-info distclean \
 	distclean-generic distclean-libtool distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
+	html-am html-local info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
 	maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
 	mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \
 	pdf-am ps ps-am tags-am uninstall uninstall-am \
@@ -1169,6 +1169,11 @@  bfdver.texi: $(srcdir)/Makefile.in
 # 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
+
 # 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.
 .NOEXPORT:
diff --git a/binutils/doc/Makefile.am b/binutils/doc/Makefile.am
index 82cdb36d19c0..1ddbd38461cd 100644
--- a/binutils/doc/Makefile.am
+++ b/binutils/doc/Makefile.am
@@ -176,6 +176,11 @@  $(DEMANGLER_NAME).1: cxxfilt.man Makefile
 	    -e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
 		> $(DEMANGLER_NAME).1
 
+html-local: binutils/index.html
+binutils/index.html: binutils.texi $(binutils_TEXINFOS)
+	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	  --split=node -I$(srcdir) $(srcdir)/binutils.texi
+
 # Maintenance
 
 # We need it for the taz target in ../../Makefile.in.
diff --git a/binutils/doc/Makefile.in b/binutils/doc/Makefile.in
index ffaf57d62a25..ed38eb0f6f00 100644
--- a/binutils/doc/Makefile.in
+++ b/binutils/doc/Makefile.in
@@ -746,7 +746,7 @@  dvi-am: $(DVIS)
 
 html: html-am
 
-html-am: $(HTMLS)
+html-am: $(HTMLS) html-local
 
 info: info-am
 
@@ -899,7 +899,7 @@  uninstall-man: uninstall-man1
 .PHONY: all all-am check check-am clean clean-aminfo clean-generic \
 	clean-libtool cscopelist-am ctags-am dist-info distclean \
 	distclean-generic distclean-libtool distdir dvi dvi-am html \
-	html-am info info-am info-local install install-am \
+	html-am html-local info info-am info-local install install-am \
 	install-data install-data-am install-dvi install-dvi-am \
 	install-exec install-exec-am install-html install-html-am \
 	install-info install-info-am install-man install-man1 \
@@ -1031,6 +1031,11 @@  $(DEMANGLER_NAME).1: cxxfilt.man Makefile
 	    -e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
 		> $(DEMANGLER_NAME).1
 
+html-local: binutils/index.html
+binutils/index.html: binutils.texi $(binutils_TEXINFOS)
+	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	  --split=node -I$(srcdir) $(srcdir)/binutils.texi
+
 # Maintenance
 
 # We need it for the taz target in ../../Makefile.in.
diff --git a/gas/doc/Makefile.am b/gas/doc/Makefile.am
index b5601e9b15c2..6c428d08afd7 100644
--- a/gas/doc/Makefile.am
+++ b/gas/doc/Makefile.am
@@ -134,4 +134,9 @@  as.1: $(srcdir)/as.texi asconfig.texi $(CPU_DOCS)
 	        (rm -f $@.T$$$$ && exit 1)
 	rm -f as.pod
 
+html-local: as/index.html
+as/index.html: as.texi $(as_TEXINFOS)
+	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	  --split=node -I$(srcdir) $(srcdir)/as.texi
+
 MAINTAINERCLEANFILES += as.info
diff --git a/gas/doc/Makefile.in b/gas/doc/Makefile.in
index 14bdd6759270..7bc3ccb9c457 100644
--- a/gas/doc/Makefile.in
+++ b/gas/doc/Makefile.in
@@ -773,7 +773,7 @@  dvi-am: $(DVIS)
 
 html: html-am
 
-html-am: $(HTMLS)
+html-am: $(HTMLS) html-local
 
 info: info-am
 
@@ -926,7 +926,7 @@  uninstall-man: uninstall-man1
 .PHONY: all all-am check check-am clean clean-aminfo clean-generic \
 	clean-libtool cscopelist-am ctags-am dist-info distclean \
 	distclean-generic distclean-libtool distdir dvi dvi-am html \
-	html-am info info-am info-local install install-am \
+	html-am html-local info info-am info-local install install-am \
 	install-data install-data-am install-data-local install-dvi \
 	install-dvi-am install-exec install-exec-am install-html \
 	install-html-am install-info install-info-am install-man \
@@ -968,6 +968,11 @@  as.1: $(srcdir)/as.texi asconfig.texi $(CPU_DOCS)
 	        (rm -f $@.T$$$$ && exit 1)
 	rm -f as.pod
 
+html-local: as/index.html
+as/index.html: as.texi $(as_TEXINFOS)
+	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	  --split=node -I$(srcdir) $(srcdir)/as.texi
+
 # 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.
 .NOEXPORT:
diff --git a/gprof/Makefile.am b/gprof/Makefile.am
index 9ae1fa443ceb..0f7a3b0fae13 100644
--- a/gprof/Makefile.am
+++ b/gprof/Makefile.am
@@ -104,4 +104,10 @@  gprof.1: $(srcdir)/gprof.texi config.texi
 	       (rm -f $@.T$$$$ && exit 1)
 	rm -f gprof.pod
 
+html-local: doc/gprof/index.html
+doc/gprof/index.html: gprof.texi $(gprof_TEXINFOS)
+	$(MKDIR_P) doc
+	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	  --split=node -I$(srcdir) $(srcdir)/gprof.texi -o doc/gprof
+
 MAINTAINERCLEANFILES = gprof.info
diff --git a/gprof/Makefile.in b/gprof/Makefile.in
index 93294d78e4c8..0c6007b4a410 100644
--- a/gprof/Makefile.in
+++ b/gprof/Makefile.in
@@ -993,7 +993,7 @@  dvi-am: $(DVIS)
 
 html: html-recursive
 
-html-am: $(HTMLS)
+html-am: $(HTMLS) html-local
 
 info: info-recursive
 
@@ -1153,14 +1153,14 @@  uninstall-man: uninstall-man1
 	clean-binPROGRAMS clean-cscope clean-generic clean-libtool \
 	cscope cscopelist-am ctags ctags-am dist-info distclean \
 	distclean-compile distclean-generic distclean-hdr \
-	distclean-libtool distclean-tags dvi dvi-am html html-am info \
-	info-am install install-am install-binPROGRAMS install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-man1 install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs installdirs-am \
-	maintainer-clean maintainer-clean-aminfo \
+	distclean-libtool distclean-tags dvi dvi-am html html-am \
+	html-local info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-man1 \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-aminfo \
 	maintainer-clean-generic mostlyclean mostlyclean-aminfo \
 	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
@@ -1199,6 +1199,12 @@  gprof.1: $(srcdir)/gprof.texi config.texi
 	       (rm -f $@.T$$$$ && exit 1)
 	rm -f gprof.pod
 
+html-local: doc/gprof/index.html
+doc/gprof/index.html: gprof.texi $(gprof_TEXINFOS)
+	$(MKDIR_P) doc
+	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	  --split=node -I$(srcdir) $(srcdir)/gprof.texi -o doc/gprof
+
 # 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.
 .NOEXPORT:
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 6deddd959915..97cb1a2c457d 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -1094,6 +1094,12 @@  diststuff: info $(EXTRA_DIST)
 # ld.1 to support parallel build.
 info-recursive: ld.1
 
+html-local: doc/ld/index.html
+doc/ld/index.html: ld.texi $(ld_TEXINFOS)
+	$(MKDIR_P) doc
+	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	  --split=node -I$(srcdir) $(srcdir)/ld.texi -o doc/ld
+
 DISTCLEANFILES = site.exp development.exp enablings.exp site.bak stringify.sed
 distclean-local:
 	rm -rf ldscripts
diff --git a/ld/Makefile.in b/ld/Makefile.in
index bce2780c343e..e07c86f7ff4d 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -2014,7 +2014,7 @@  dvi-am: $(DVIS)
 
 html: html-recursive
 
-html-am: $(HTMLS)
+html-am: $(HTMLS) html-local
 
 info: info-recursive
 
@@ -2177,12 +2177,12 @@  uninstall-man: uninstall-man1
 	cscopelist-am ctags ctags-am dist-info distclean \
 	distclean-DEJAGNU distclean-compile distclean-generic \
 	distclean-hdr distclean-libtool distclean-local distclean-tags \
-	dvi dvi-am html html-am info info-am install install-am \
-	install-bfdpluginLTLIBRARIES install-binPROGRAMS install-data \
-	install-data-am install-data-local install-dvi install-dvi-am \
-	install-exec install-exec-am install-exec-local install-html \
-	install-html-am install-info install-info-am install-man \
-	install-man1 install-pdf install-pdf-am install-ps \
+	dvi dvi-am html html-am html-local info info-am install \
+	install-am install-bfdpluginLTLIBRARIES install-binPROGRAMS \
+	install-data install-data-am install-data-local install-dvi \
+	install-dvi-am install-exec install-exec-am install-exec-local \
+	install-html install-html-am install-info install-info-am \
+	install-man install-man1 install-pdf install-pdf-am install-ps \
 	install-ps-am install-strip installcheck installcheck-am \
 	installdirs installdirs-am maintainer-clean \
 	maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
@@ -2687,6 +2687,12 @@  diststuff: info $(EXTRA_DIST)
 # But info isn't a direct target. Make info-recursive to depend on
 # ld.1 to support parallel build.
 info-recursive: ld.1
+
+html-local: doc/ld/index.html
+doc/ld/index.html: ld.texi $(ld_TEXINFOS)
+	$(MKDIR_P) doc
+	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+	  --split=node -I$(srcdir) $(srcdir)/ld.texi -o doc/ld
 distclean-local:
 	rm -rf ldscripts