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 mm/lru: revise the comments of lru_lock 2020-12-15 14:48:04 -08:00
events-msr.rst docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
events-nmi.rst docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
events-power.rst PM: QoS: Simplify definitions of CPU latency QoS trace events 2020-02-13 11:26:39 +01:00
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 Documentation: Fix typos 2023-08-18 11:29:03 -06:00
index.rst Documentation: use a source-read extension for the index link boilerplate 2026-01-23 11:59:34 -07:00
intel_th.rst docs: trace: fix a typo 2020-08-11 10:22:15 -06:00
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 docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
osnoise-tracer.rst rtla/osnoise: set the default threshold to 1us 2024-07-01 18:54:31 -04:00
ring-buffer-design.rst docs: trace: ring-buffer-design.rst: use the new SPDX tag 2020-09-24 11:07:44 -06:00
ring-buffer-map.rst Documentation: tracing: Add ring-buffer mapping 2024-05-13 18:09:56 -04:00
stm.rst Documentation: trace/stm: drop doubled words 2020-07-05 14:40:55 -06:00
sys-t.rst stm class: Document the MIPI SyS-T protocol usage 2018-10-11 12:12:55 +02:00
timerlat-tracer.rst Documentation/trace: Specify exact priority for timerlat 2025-11-05 11:19:20 -07:00
tracepoint-analysis.rst docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
tracepoints.rst tracepoint: Have tracepoints created with DECLARE_TRACE() have _tp suffix 2025-05-14 11:19:32 -04:00
uprobetracer.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
user_events.rst tracing/user_events: Document multi-format flag 2024-03-18 10:13:16 -04:00