projects/guix·blob python-team · refs

71 lines · 2.4 KiB

1# GNU Guix --- Functional package management for GNU
2# Copyright © 2018 Julien Lepiller <[email protected]>
3# Copyright © 2021 Maxim Cournoyer <[email protected]>
4# Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
5# Copyright © 2024 gemmaro <[email protected]>
6#
7# This file is part of GNU Guix.
8#
9# GNU Guix is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 3 of the License, or (at
12# your option) any later version.
13#
14# GNU Guix is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22DOC_PO_FILES = \
23 %D%/guix-manual.de.po \
24 %D%/guix-manual.es.po \
25 %D%/guix-manual.fr.po \
26 %D%/guix-manual.it.po \
27 %D%/guix-manual.pt_BR.po \
28 %D%/guix-manual.ru.po \
29 %D%/guix-manual.zh_CN.po
30
31DOC_COOKBOOK_PO_FILES = \
32 %D%/guix-cookbook.de.po \
33 %D%/guix-cookbook.es.po \
34 %D%/guix-cookbook.fr.po \
35 %D%/guix-cookbook.it.po \
36 %D%/guix-cookbook.ko.po \
37 %D%/guix-cookbook.pt_BR.po \
38 %D%/guix-cookbook.ru.po \
39 %D%/guix-cookbook.sk.po \
40 %D%/guix-cookbook.sv.po \
41 %D%/guix-cookbook.zh_CN.po
42
43EXTRA_DIST = \
44 %D%/po4a.cfg \
45 %D%/guix-manual.pot \
46 %D%/guix-cookbook.pot \
47 $(DOC_PO_FILES) \
48 $(DOC_COOKBOOK_PO_FILES)
49
50%D%/%.pot: $(srcdir)/doc/%.texi
51 $(AM_V_PO4A)$(PO4A) --no-translations -M UTF-8 \
52 --package-version "$(VERSION)" \
53 --variable master="$<" \
54 --variable pot="$@-t" \
55 --variable po=/dev/null \
56 --variable localized=/dev/null \
57 $(POT_OPTIONS) %D%/po4a.cfg
58 date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
59 || echo $(SOURCE_DATE_EPOCH))" \
60 sed -ri -e "s,^(.POT-Creation-Date: )[^\]*,\1$$date," "$@-t"
61 mv "$@-t" "$@"
62
63%D%/guix-manual.pot: %D%/guix.pot %D%/contributing.pot
64 msgcat $^ > "$@-t"
65 date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
66 || echo $(SOURCE_DATE_EPOCH))" \
67 sed -ri "s,^(.POT-Creation-Date: )[^\]*,\1$$date," "$@-t"
68 mv "$@-t" "$@"
69
70doc-pot-update: %D%/guix-manual.pot %D%/guix-cookbook.pot
71.PHONY: doc-pot-update