summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCharles Roelli <charles@aurox.ch>2026-05-01 10:42:51 +0200
committerLudovic Courtès <ludo@gnu.org>2026-05-03 22:45:53 +0200
commit9d0bb1ef2671fd2c8f30a96660b4dfa2ee27ae4d (patch)
treed4e6a3d8bce4aaa0c6d08b6e3d385ca8c50d48f9 /doc
parent2b94e23e7cf142c172b04d9d0d5fb49c1a84a26b (diff)
build: Fix out-of-tree make.
* doc/local.mk (lang_to_texinfo): Refer to .texi files using srcdir. (xref_command): Reference pre-inst-env using builddir. ($(srcdir)/%D%/guix.%.texi): ($(srcdir)/%D%/guix-cookbook.%.texi): ($(srcdir)/%D%/contributing.%.texi): Refer to source files using srcdir. * nix/local.mk (etc/guix-gc.timer): Use the name of the prerequisite, not just its file name. Change-Id: I247bcd873c8355d0eae07870ec849d2eb8cfa6c5 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Merges: #8267
Diffstat (limited to 'doc')
-rw-r--r--doc/local.mk22
1 files changed, 11 insertions, 11 deletions
diff --git a/doc/local.mk b/doc/local.mk
index ef8e5249400..9452ccaf35f 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -30,7 +30,7 @@ COOKBOOK_LANGUAGES = de es fr it ko pt_BR ru sk sv ta zh_CN
30 30
31# Arg1: A list of languages codes. 31# Arg1: A list of languages codes.
32# Arg2: The file name stem. 32# Arg2: The file name stem.
33lang_to_texinfo = $(foreach lang,$(1),%D%/$(2).$(lang).texi) 33lang_to_texinfo = $(foreach lang,$(1),$(srcdir)/%D%/$(2).$(lang).texi)
34 34
35# Automake does not understand GNU Make non-standard extensions, 35# Automake does not understand GNU Make non-standard extensions,
36# unfortunately, so we cannot use the above patsubst-based function here. 36# unfortunately, so we cannot use the above patsubst-based function here.
@@ -104,7 +104,7 @@ MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO)
104# reference is not translated, which means it references a section that does not 104# reference is not translated, which means it references a section that does not
105# exist. 105# exist.
106define xref_command 106define xref_command
107$(top_srcdir)/pre-inst-env $(GUILE) --no-auto-compile \ 107$(top_builddir)/pre-inst-env $(GUILE) --no-auto-compile \
108 "$(top_srcdir)/build-aux/convert-xref.scm" \ 108 "$(top_srcdir)/build-aux/convert-xref.scm" \
109 $@.tmp $< 109 $@.tmp $<
110endef 110endef
@@ -116,21 +116,21 @@ dummy_pot = $(shell mktemp --suffix=.pot)
116$(srcdir)/%D%/guix.%.texi: po/doc/guix-manual.%.po $(srcdir)/%D%/contributing.%.texi guix/build/po.go 116$(srcdir)/%D%/guix.%.texi: po/doc/guix-manual.%.po $(srcdir)/%D%/contributing.%.texi guix/build/po.go
117 -$(AM_V_PO4A)$(PO4A) --no-update \ 117 -$(AM_V_PO4A)$(PO4A) --no-update \
118 --variable localized="$@.tmp" \ 118 --variable localized="$@.tmp" \
119 --variable master="%D%/guix.texi" \ 119 --variable master="$(srcdir)/%D%/guix.texi" \
120 --variable po="$<" \ 120 --variable po="$<" \
121 --variable pot=$(dummy_pot) \ 121 --variable pot=$(dummy_pot) \
122 po/doc/po4a.cfg 122 $(srcdir)/po/doc/po4a.cfg
123 -sed -i "s|guix\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp" 123 -sed -i "s|guix\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp"
124 -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command) 124 -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command)
125 -mv "$@.tmp" "$@" 125 -mv "$@.tmp" "$@"
126 126
127$(srcdir)/%D%/guix-cookbook.%.texi: po/doc/guix-cookbook.%.po guix/build/po.go 127$(srcdir)/%D%/guix-cookbook.%.texi: po/doc/guix-cookbook.%.po guix/build/po.go
128 -$(AM_V_PO4A)$(PO4A) --no-update \ 128 -$(AM_V_PO4A)$(PO4A) --no-update \
129 --variable localized="$@.tmp" \ 129 --variable localized="$@.tmp" \
130 --variable master="%D%/guix-cookbook.texi" \ 130 --variable master="$(srcdir)/%D%/guix-cookbook.texi" \
131 --variable po="$<" \ 131 --variable po="$<" \
132 --variable pot=$(dummy_pot) \ 132 --variable pot=$(dummy_pot) \
133 po/doc/po4a.cfg 133 $(srcdir)/po/doc/po4a.cfg
134 -sed -i "s|guix-cookbook\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp" 134 -sed -i "s|guix-cookbook\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp"
135 -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command) 135 -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command)
136 -mv "$@.tmp" "$@" 136 -mv "$@.tmp" "$@"
@@ -138,10 +138,10 @@ $(srcdir)/%D%/guix-cookbook.%.texi: po/doc/guix-cookbook.%.po guix/build/po.go
138$(srcdir)/%D%/contributing.%.texi: po/doc/guix-manual.%.po guix/build/po.go 138$(srcdir)/%D%/contributing.%.texi: po/doc/guix-manual.%.po guix/build/po.go
139 -$(AM_V_PO4A)$(PO4A) --no-update \ 139 -$(AM_V_PO4A)$(PO4A) --no-update \
140 --variable localized="$@.tmp" \ 140 --variable localized="$@.tmp" \
141 --variable master="%D%/contributing.texi" \ 141 --variable master="$(srcdir)/%D%/contributing.texi" \
142 --variable po="$<" \ 142 --variable po="$<" \
143 --variable pot=$(dummy_pot) \ 143 --variable pot=$(dummy_pot) \
144 po/doc/po4a.cfg 144 $(srcdir)/po/doc/po4a.cfg
145 -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command) 145 -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command)
146 -mv "$@.tmp" "$@" 146 -mv "$@.tmp" "$@"
147 147