From cd0cffdf30d2adf14fa64778df6db46e57dda9da Mon Sep 17 00:00:00 2001 From: Luca Toniolo <10792599+grandixximo@users.noreply.github.com> Date: Sun, 21 Jun 2026 20:12:02 +0800 Subject: [PATCH] docs: build the same HTML page set for every language Partials (e.g. hal/halscope.adoc) are include::d into a chapter and have no standalone English page, but the per-language target list came from po4a.cfg, which lists them as translation units, so translations rendered them standalone with a switcher link to a non-existent en/ page. Restrict translated targets to the curated English page set. --- docs/src/Submakefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/src/Submakefile b/docs/src/Submakefile index 1e6cc85b64f..bb46ea6013d 100644 --- a/docs/src/Submakefile +++ b/docs/src/Submakefile @@ -383,12 +383,18 @@ DOC_TARGETS_HTML_EN := $(addprefix $(DOC_OUT_HTML)/en/, \ $(filter-out $(foreach L,$(LANGUAGES),$(L)/%), \ $(patsubst %.adoc,%.html, \ $(filter-out Master_%, $(DOC_SRCS_EN))))) +# Page stems English builds (Master_* are PDF-only; include::d partials are not +# pages). Translations are filtered to this set: the per-language list comes +# from po4a.cfg, which lists partials too, so without it a partial renders +# standalone with a dead en/ language-switcher link. +DOC_HTML_PAGE_STEMS := $(patsubst %.adoc,%.html,$(filter-out Master_% man/%,$(DOC_SRCS_EN))) $(foreach L,$(LANGUAGES), \ $(eval DOC_TARGETS_HTML_$(call toUC,$(L)) := \ - $$(addprefix $(DOC_OUT_HTML)/, \ - $$(patsubst %.adoc,%.html, \ + $$(addprefix $(DOC_OUT_HTML)/$(L)/, \ + $$(filter $$(DOC_HTML_PAGE_STEMS), \ + $$(patsubst $(L)/%.adoc,%.html, \ $$(filter-out $(L)/Master_% $(L)/man/%, \ - $$(DOC_SRCS_$(call toUC,$(L)))))))) + $$(DOC_SRCS_$(call toUC,$(L))))))))) DOC_TARGETS_HTML = $(DOC_TARGETS_HTML_EN) ifeq ($(BUILD_DOCS_TRANSLATED),yes) DOC_TARGETS_HTML += $(foreach L,$(LANGUAGES),$(DOC_TARGETS_HTML_$(call toUC,$(L))))