summaryrefslogtreecommitdiff
path: root/doc/local.mk
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2021-05-03 12:35:55 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-05-03 22:41:35 -0400
commit66072a00d78270fb363866438087066e0910add4 (patch)
tree0bb9a83cdcfc3fa2387fa512b9967106eb92535a /doc/local.mk
parent10cf742cbc8c887cfd370ceeeb36c9c5c05c33d0 (diff)
nls: Guard against the list of translated Texinfo files becoming stale.
This change is so that the list of translated Texinfo files remain in sync with the list of supported (translated) languages. * doc/local.mk (MANUAL_LANGUAGES, COOKBOOK_LANGUAGES): New variables. (lang_to_texinfos): New function. (TRANSLATED_INFO): Use it to construct the list of files. Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'doc/local.mk')
-rw-r--r--doc/local.mk28
1 files changed, 15 insertions, 13 deletions
diff --git a/doc/local.mk b/doc/local.mk
index 70e102bdef4..34321d6656a 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -4,7 +4,7 @@
4# Copyright © 2013 Andreas Enge <andreas@enge.fr> 4# Copyright © 2013 Andreas Enge <andreas@enge.fr>
5# Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> 5# Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6# Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org> 6# Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org>
7# Copyright © 2018 Julien Lepiller <julien@lepiller.eu> 7# Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
8# 8#
9# This file is part of GNU Guix. 9# This file is part of GNU Guix.
10# 10#
@@ -21,6 +21,16 @@
21# You should have received a copy of the GNU General Public License 21# You should have received a copy of the GNU General Public License
22# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. 22# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 23
24# If adding a language, update the following variables, and info_TEXINFOS.
25MANUAL_LANGUAGES = de es fa fr it ko pt_BR ru sk zh_CN
26COOKBOOK_LANGUAGES = de fa fr ko zh_Hans
27
28# Arg1: A list of languages codes.
29# Arg2: The file name stem.
30lang_to_texinfo = $(foreach lang,$(1),%D%/$(2).$(lang).texi)
31
32# Automake does not understand GNU Make non-standard extensions,
33# unfortunately, so we cannot use the above patsubst-based function here.
24info_TEXINFOS = %D%/guix.texi \ 34info_TEXINFOS = %D%/guix.texi \
25 %D%/guix.de.texi \ 35 %D%/guix.de.texi \
26 %D%/guix.es.texi \ 36 %D%/guix.es.texi \
@@ -70,18 +80,10 @@ OS_CONFIG_EXAMPLES_TEXI = \
70 %D%/os-config-desktop.texi \ 80 %D%/os-config-desktop.texi \
71 %D%/os-config-lightweight-desktop.texi 81 %D%/os-config-lightweight-desktop.texi
72 82
73TRANSLATED_INFO = \ 83TRANSLATED_INFO = \
74 %D%/guix.de.texi \ 84 $(call lang_to_texinfo,$(MANUAL_LANGUAGES),guix) \
75 %D%/guix.es.texi \ 85 $(call lang_to_texinfo,$(MANUAL_LANGUAGES),contributing) \
76 %D%/guix.fr.texi \ 86 $(call lang_to_texinfo,$(COOKBOOK_LANGUAGES),guix-cookbook)
77 %D%/guix.ru.texi \
78 %D%/guix.zh_CN.texi \
79 %D%/contributing.de.texi \
80 %D%/contributing.es.texi \
81 %D%/contributing.fr.texi \
82 %D%/contributing.ru.texi \
83 %D%/contributing.zh_CN.texi \
84 %D%/guix-cookbook.de.texi
85 87
86# Bundle this file so that makeinfo finds it in out-of-source-tree builds. 88# Bundle this file so that makeinfo finds it in out-of-source-tree builds.
87BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO) 89BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO)