Skip to content

Commit cd0cffd

Browse files
committed
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.
1 parent 853878b commit cd0cffd

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

docs/src/Submakefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,12 +383,18 @@ DOC_TARGETS_HTML_EN := $(addprefix $(DOC_OUT_HTML)/en/, \
383383
$(filter-out $(foreach L,$(LANGUAGES),$(L)/%), \
384384
$(patsubst %.adoc,%.html, \
385385
$(filter-out Master_%, $(DOC_SRCS_EN)))))
386+
# Page stems English builds (Master_* are PDF-only; include::d partials are not
387+
# pages). Translations are filtered to this set: the per-language list comes
388+
# from po4a.cfg, which lists partials too, so without it a partial renders
389+
# standalone with a dead en/ language-switcher link.
390+
DOC_HTML_PAGE_STEMS := $(patsubst %.adoc,%.html,$(filter-out Master_% man/%,$(DOC_SRCS_EN)))
386391
$(foreach L,$(LANGUAGES), \
387392
$(eval DOC_TARGETS_HTML_$(call toUC,$(L)) := \
388-
$$(addprefix $(DOC_OUT_HTML)/, \
389-
$$(patsubst %.adoc,%.html, \
393+
$$(addprefix $(DOC_OUT_HTML)/$(L)/, \
394+
$$(filter $$(DOC_HTML_PAGE_STEMS), \
395+
$$(patsubst $(L)/%.adoc,%.html, \
390396
$$(filter-out $(L)/Master_% $(L)/man/%, \
391-
$$(DOC_SRCS_$(call toUC,$(L))))))))
397+
$$(DOC_SRCS_$(call toUC,$(L)))))))))
392398
DOC_TARGETS_HTML = $(DOC_TARGETS_HTML_EN)
393399
ifeq ($(BUILD_DOCS_TRANSLATED),yes)
394400
DOC_TARGETS_HTML += $(foreach L,$(LANGUAGES),$(DOC_TARGETS_HTML_$(call toUC,$(L))))

0 commit comments

Comments
 (0)