mirror-linux/Documentation/trace
Jani Nikula a592a36e49 Documentation: use a source-read extension for the index link boilerplate
The root document usually has a special :ref:`genindex` link to the
generated index. This is also the case for Documentation/index.rst. The
other index.rst files deeper in the directory hierarchy usually don't.

For SPHINXDIRS builds, the root document isn't Documentation/index.rst,
but some other index.rst in the hierarchy. Currently they have a
".. only::" block to add the index link when doing SPHINXDIRS html
builds.

This is obviously very tedious and repetitive. The link is also added to
all index.rst files in the hierarchy for SPHINXDIRS builds, not just the
root document.

Put the boilerplate in a sphinx-includes/subproject-index.rst file, and
include it at the end of the root document for subproject builds in an
ad-hoc source-read extension defined in conf.py.

For now, keep having the boilerplate in translations, because this
approach currently doesn't cover translated index link headers.

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
[jc: did s/doctree/kern_doc_dir/ ]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260123143149.2024303-1-jani.nikula@intel.com>
2026-01-23 11:59:34 -07:00
..
coresight Char/Misc/IIO pull request for 6.16-rc1 2025-06-06 11:50:47 -07:00
postprocess docs: trace: decode_msr.py: make it compatible with python 3 2025-02-13 09:45:22 -07:00
rv Documentation/rv: Fix dead link to monitor_synthesis.rst 2025-12-22 15:30:26 -07:00
boottime-trace.rst tracing: rephrase for clearer documentation 2025-09-03 15:31:30 -06:00
debugging.rst tracing: fix grammar error in debugging.rst 2025-09-03 15:31:48 -06:00
eprobetrace.rst Documentation: tracing: Add documentation about eprobes 2025-07-30 10:38:43 -04:00
events-kmem.rst
events-msr.rst
events-nmi.rst
events-power.rst
events.rst docs: Corrected typo in trace/events 2025-08-21 11:59:11 -06:00
fprobe.rst Documentation/trace: Fix links to other documents 2026-01-12 09:31:19 -07:00
fprobetrace.rst Documentation: tracing: Fix spelling mistakes 2024-05-07 08:00:25 -06:00
ftrace-design.rst tracing: Remove redundant config HAVE_FTRACE_MCOUNT_RECORD 2025-07-22 20:15:56 -04:00
ftrace-uses.rst Documentation/trace: Fix links to other documents 2026-01-12 09:31:19 -07:00
ftrace.rst tracing: Add a config and syscall_user_buf_size file to limit amount written 2025-10-28 20:10:59 -04:00
function-graph-fold.vim
hisi-ptt.rst Documentation: ABI + trace: hisi_ptt: update paths to bus/event_source 2024-05-02 11:36:11 +01:00
histogram-design.rst Documentation: trace: histogram-design: Wrap introductory note in note:: directive 2025-09-18 11:49:26 -06:00
histogram.rst Documentation: trace: histogram: Convert ftrace docs cross-reference 2025-09-18 11:49:26 -06:00
hwlat_detector.rst
index.rst Documentation: use a source-read extension for the index link boilerplate 2026-01-23 11:59:34 -07:00
intel_th.rst
kprobes.rst docs, kprobes: Add riscv as supported architecture 2024-05-02 10:05:25 -06:00
kprobetrace.rst Probes updates for v6.10: 2024-05-17 18:29:30 -07:00
mmiotrace.rst
osnoise-tracer.rst rtla/osnoise: set the default threshold to 1us 2024-07-01 18:54:31 -04:00
ring-buffer-design.rst
ring-buffer-map.rst Documentation: tracing: Add ring-buffer mapping 2024-05-13 18:09:56 -04:00
stm.rst
sys-t.rst
timerlat-tracer.rst Documentation/trace: Specify exact priority for timerlat 2025-11-05 11:19:20 -07:00
tracepoint-analysis.rst
tracepoints.rst tracepoint: Have tracepoints created with DECLARE_TRACE() have _tp suffix 2025-05-14 11:19:32 -04:00
uprobetracer.rst
user_events.rst tracing/user_events: Document multi-format flag 2024-03-18 10:13:16 -04:00