Fix info/dir generation in fresh checkouts (bug#81332)

The previous bug#81332 fix made info/dir depend on doc/misc/NAME.texi
names derived from INFO_COMMON.  For the manuals whose source is .org
(modus-themes, org), these .texi files are generated and do not exist
in a fresh checkout, and there is no rule to build them at this level,
so building Emacs fails with:

  make[1]: *** No rule to make target 'doc/misc/modus-themes.texi',
  needed by 'info/dir'.  Stop.

* Makefile.in (srcdir_doc_info_dir_inputs): For the default language,
depend on the actual sources reported by doc/misc echo-sources
(texi_misc_default), which lists .org sources for the org-based
manuals; make-info-dir extracts dir entries from both formats.
(GET_DOC_SRC): Only handle translated languages; drop the mapping of
default translation names to doc/misc .texi names.
This commit is contained in:
Boris Buliga 2026-07-09 09:47:08 +03:00 committed by Eli Zaretskii
parent 9307284c69
commit 34436c11ca

View file

@ -1190,19 +1190,27 @@ endef
$(foreach lang,$(DOCLANGS),$(eval $(call set_texi_misc,$(lang))))
## For the default language, depend on the actual sources reported by
## doc/misc (echo-sources): .org files for the org-based manuals and
## .texi files for the rest. Deriving foo.texi names from INFO_COMMON
## would break in a fresh checkout, because the .texi files of the
## org-based manuals (e.g. modus-themes.texi) are generated and there
## is no rule to build them at this level. make-info-dir extracts dir
## entries from both formats.
srcdir_doc_info_dir_inputs := \
${srcdir}/doc/emacs/emacs.texi \
${srcdir}/doc/lispintro/emacs-lisp-intro.texi \
${srcdir}/doc/lispref/elisp.texi
${srcdir}/doc/lispref/elisp.texi \
$(addprefix ${srcdir}/doc/misc/,${texi_misc_default})
TRANSLATED_DIRS:=misc
# $(1) = dir
# $(2) = lang
define GET_DOC_SRC
-include ${srcdir}/doc/translations/$(2)/$(1)/info_common.mk
INFO_COMMON:=$$(subst ccmode,cc-mode,$$(INFO_COMMON))
srcdir_doc_info_dir_inputs:=$$(srcdir_doc_info_dir_inputs) $$(patsubst ${srcdir}/doc/translations/default/$(1)/%-default.texi,${srcdir}/doc/$(1)/%.texi,$$(patsubst %,${srcdir}/doc/translations/$(2)/$(1)/%-$(2).texi,$$(INFO_COMMON)))
srcdir_doc_info_dir_inputs:=$$(srcdir_doc_info_dir_inputs) $$(patsubst %,${srcdir}/doc/translations/$(2)/$(1)/%-$(2).texi,$$(INFO_COMMON))
endef
$(foreach dir,$(TRANSLATED_DIRS),$(foreach lang,$(DOCLANGS),$(eval $(call GET_DOC_SRC,$(dir),$(lang)))))
$(foreach dir,$(TRANSLATED_DIRS),$(foreach lang,$(filter-out default,$(DOCLANGS)),$(eval $(call GET_DOC_SRC,$(dir),$(lang)))))
info_dir_inputs = \
../build-aux/dir_top \