[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/08: maint: Add 'download-po' rule.
From: |
guix-commits |
Subject: |
03/08: maint: Add 'download-po' rule. |
Date: |
Sun, 25 Aug 2019 16:48:58 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 61a224adc3426d9fd0932b755205642650e89367
Author: Ludovic Courtès <address@hidden>
Date: Sun Aug 25 22:16:37 2019 +0200
maint: Add 'download-po' rule.
* Makefile.am (make-download-po-rule): New definition.
Add top-level 'eval' and calls to 'make-download-po-rule' to generate
'download-po.DOMAIN' rules.
(download-po): New rule.
---
Makefile.am | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 0bd85e8..fa6bf8f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -851,6 +851,39 @@ cuirass-jobs.scm: $(GOBJECTS)
.PHONY: clean-go make-go as-derivation
.PHONY: update-guix-package update-NEWS release
+# Downloading up-to-date PO files.
+
+# make-download-po-rule DOMAIN DIRECTORY [FILE-NAME-PREFIX]
+define make-download-po-rule
+
+download-po.$(1):
+ if [ -f "$(top_srcdir)/$(2)/LINGUAS" ]; then
\
+ LINGUAS="`grep -v '^[[:blank:]]*#' < $(top_srcdir)/$(2)/LINGUAS`" ;
\
+ else
\
+ LINGUAS="`(cd $(top_srcdir)/$(2);
\
+ for i in *.po; do echo $$$$i; done) | cut -d . -f 2`" ;
\
+ fi ;
\
+ for lang in $$$$LINGUAS; do
\
+ if wget -nv -O "$(top_srcdir)/$(2)/$(3)$$$$lang.po.tmp"
\
+ "https://translationproject.org/latest/$(1)/$$$$lang.po" ;
\
+ then
\
+ mv "$(top_srcdir)/$(2)/$(3)$$$$lang.po"{.tmp,} ;
\
+ else
\
+ rm "$(top_srcdir)/$(2)/$(3)$$$$lang.po.tmp" ;
\
+ fi ;
\
+ done
+
+.PHONY: download-po.$(1)
+
+endef
+
+$(eval $(call make-download-po-rule,guix,po/guix))
+$(eval $(call make-download-po-rule,guix-packages,po/packages))
+$(eval $(call make-download-po-rule,guix-manual,po/doc,guix-manual.))
+
+download-po: $(foreach domain,guix guix-packages
guix-manual,download-po.$(domain))
+.PHONY: download-po
+
## -------------- ##
## Silent rules. ##
## -------------- ##
- branch master updated (8c1379b -> 7dff322), guix-commits, 2019/08/25
- 01/08: gnu: ghostscript: Add a new variant that depends on Freetype., guix-commits, 2019/08/25
- 02/08: gnu: ghostscript: Replace with the "fixed" Ghostscript., guix-commits, 2019/08/25
- 03/08: maint: Add 'download-po' rule.,
guix-commits <=
- 07/08: gnu: Add wterm., guix-commits, 2019/08/25
- 08/08: gnu: shroud: Update to 0.1.2., guix-commits, 2019/08/25
- 04/08: nls: Update 'fr' translation., guix-commits, 2019/08/25
- 06/08: nls: Update 'sv' translation., guix-commits, 2019/08/25
- 05/08: nls: Update 'de' translation., guix-commits, 2019/08/25