aboutsummaryrefslogtreecommitdiff
Upstream status: https://marc.info/?l=linux-doc&m=166861669723994&w=2

From 7edb5b278ee383ff9bed525329b2cdbe22317bf2 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 14 Nov 2022 22:51:11 -0500
Subject: [PATCH] doc: add texinfodocs and infodocs targets

Sphinx supports generating Texinfo sources and Info documentation,
which can be navigated easily and is convenient to search (via the
indexed nodes or anchors, for example).

This change also causes the html output to appear under its own output
sub-directory, which makes it easier to install, since it's clean from
.doctrees or other output formats.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
 Documentation/Makefile                     | 13 ++++++++++++-
 Documentation/userspace-api/media/Makefile |  3 ++-
 Makefile                                   |  2 +-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 64d44c1ecad3..bd8dac560633 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -93,7 +93,16 @@ quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
 
 htmldocs:
 	@$(srctree)/scripts/sphinx-pre-install --version-check
-	@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
+	@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),html,$(var)))
+
+texinfodocs:
+	@$(srctree)/scripts/sphinx-pre-install --version-check
+	@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var)))
+
+# Note: the 'info' Make target is generated by sphinx itself when
+# running the texinfodocs target define above.
+infodocs: texinfodocs
+	$(MAKE) -C $(BUILDDIR)/texinfo info
 
 linkcheckdocs:
 	@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
@@ -143,6 +152,8 @@ cleandocs:
 dochelp:
 	@echo  ' Linux kernel internal documentation in different formats from ReST:'
 	@echo  '  htmldocs        - HTML'
+	@echo  '  texinfodocs     - Texinfo'
+	@echo  '  infodocs        - Info'
 	@echo  '  latexdocs       - LaTeX'
 	@echo  '  pdfdocs         - PDF'
 	@echo  '  epubdocs        - EPUB'
diff --git a/Documentation/userspace-api/media/Makefile b/Documentation/userspace-api/media/Makefile
index 00922aa7efde..3d8aaf5c253b 100644
--- a/Documentation/userspace-api/media/Makefile
+++ b/Documentation/userspace-api/media/Makefile
@@ -47,10 +47,11 @@ $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exception
 
 # Media build rules
 
-.PHONY: all html epub xml latex
+.PHONY: all html texinfo epub xml latex
 
 all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
 html: all
+texinfo: all
 epub: all
 xml: all
 latex: $(IMGPDF) all
diff --git a/Makefile b/Makefile
index 58cd4f5e1c3a..b3266c408b6c 100644
--- a/Makefile
+++ b/Makefile
@@ -1785,7 +1785,7 @@ $(help-board-dirs): help-%:
 # Documentation targets
 # ---------------------------------------------------------------------------
 DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
-	       linkcheckdocs dochelp refcheckdocs
+	       linkcheckdocs dochelp refcheckdocs texinfodocs infodocs
 PHONY += $(DOC_TARGETS)
 $(DOC_TARGETS):
 	$(Q)$(MAKE) $(build)=Documentation $@

base-commit: 81e7cfa3a9eb4ba6993a9c71772fdab21bc5d870
-- 
2.38.1

?id=d76f073aba307bcf0b277290c161a8c054c1c549'>gnu: rust-anyhow-1: Drop minor version from name....* gnu/packages/crates-io.scm (rust-anyhow-1): Drop minor version from name. (rust-codespan-reporting-0.9) (rust-swc-1) (rust-syn-1) (rust-thiserror-1) (rust-wasm-bindgen-webidl-0.2) (rust-svd-parser-0.9): Adjust accordingly. * gnu/packages/crates-gtk.scm (rust-glib-macros-0.10): Same. * gnu/packages/rust-apps.scm (fd): Same. * gnu/packages/sequoia.scm (sequoia): Same. Efraim Flashner 2021-01-03gnu: watchexec: Update to 1.14.1....* gnu/packages/rust-apps.scm (watchexec): Update to 1.14.1. [arguments]: Add rust-embed-resource to, and remove rust-clap & rust-winapi, from #:cargo-inputs. Tobias Geerinckx-Rice 2021-01-03gnu: Add rust-cbindgen-0.16....* gnu/packages/rust-apps.scm (rust-cbindgen-0.16): New variable. Nicolas Goaziou 2020-12-06gnu: bat: Fix build....* gnu/packages/rust-apps.scm (bat)[native-inputs]: Add pkg-config. [inputs]: Add libgit2. This is a followup to 063f6dfc37a674b24ca75fd20530a8039bddfd8f. Nicolas Goaziou 2020-12-05gnu: bat: Remove duplicate Cargo input....* gnu/packages/rust-apps.scm (bat)[arguments]: Remove duplicate rust-clap Cargo input. Nicolas Goaziou 2020-12-05gnu: Add bat....* gnu/packages/rust-apps.scm (bat): New variable. Nicolas Goaziou