projects/guix·blob python-team · refs

88 lines · 3.2 KiB

1Upstream status: https://marc.info/?l=linux-doc&m=166861669723994&w=2
2
3From 7edb5b278ee383ff9bed525329b2cdbe22317bf2 Mon Sep 17 00:00:00 2001
4From: Maxim Cournoyer <[email protected]>
5Date: Mon, 14 Nov 2022 22:51:11 -0500
6Subject: [PATCH] doc: add texinfodocs and infodocs targets
7
8Sphinx supports generating Texinfo sources and Info documentation,
9which can be navigated easily and is convenient to search (via the
10indexed nodes or anchors, for example).
11
12This change also causes the html output to appear under its own output
13sub-directory, which makes it easier to install, since it's clean from
14.doctrees or other output formats.
15
16Signed-off-by: Maxim Cournoyer <[email protected]>
17---
18 Documentation/Makefile | 13 ++++++++++++-
19 Documentation/userspace-api/media/Makefile | 3 ++-
20 Makefile | 2 +-
21 3 files changed, 15 insertions(+), 3 deletions(-)
22
23diff --git a/Documentation/Makefile b/Documentation/Makefile
24index 64d44c1ecad3..bd8dac560633 100644
25--- a/Documentation/Makefile
26+++ b/Documentation/Makefile
27@@ -93,7 +93,16 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
28
29 htmldocs:
30 @$(srctree)/scripts/sphinx-pre-install --version-check
31- @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
32+ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),html,$(var)))
33+
34+texinfodocs:
35+ @$(srctree)/scripts/sphinx-pre-install --version-check
36+ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var)))
37+
38+# Note: the 'info' Make target is generated by sphinx itself when
39+# running the texinfodocs target define above.
40+infodocs: texinfodocs
41+ $(MAKE) -C $(BUILDDIR)/texinfo info
42
43 linkcheckdocs:
44 @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var)))
45@@ -143,6 +152,8 @@ cleandocs:
46 dochelp:
47 @echo ' Linux kernel internal documentation in different formats from ReST:'
48 @echo ' htmldocs - HTML'
49+ @echo ' texinfodocs - Texinfo'
50+ @echo ' infodocs - Info'
51 @echo ' latexdocs - LaTeX'
52 @echo ' pdfdocs - PDF'
53 @echo ' epubdocs - EPUB'
54diff --git a/Documentation/userspace-api/media/Makefile b/Documentation/userspace-api/media/Makefile
55index 00922aa7efde..3d8aaf5c253b 100644
56--- a/Documentation/userspace-api/media/Makefile
57+++ b/Documentation/userspace-api/media/Makefile
58@@ -47,10 +47,11 @@ $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exception
59
60 # Media build rules
61
62-.PHONY: all html epub xml latex
63+.PHONY: all html texinfo epub xml latex
64
65 all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
66 html: all
67+texinfo: all
68 epub: all
69 xml: all
70 latex: $(IMGPDF) all
71diff --git a/Makefile b/Makefile
72index 58cd4f5e1c3a..b3266c408b6c 100644
73--- a/Makefile
74+++ b/Makefile
75@@ -1785,7 +1785,7 @@ $(help-board-dirs): help-%:
76 # Documentation targets
77 # ---------------------------------------------------------------------------
78 DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
79- linkcheckdocs dochelp refcheckdocs
80+ linkcheckdocs dochelp refcheckdocs texinfodocs infodocs
81 PHONY += $(DOC_TARGETS)
82 $(DOC_TARGETS):
83 $(Q)$(MAKE) $(build)=Documentation $@
84
85base-commit: 81e7cfa3a9eb4ba6993a9c71772fdab21bc5d870
86--
872.38.1
88