diff options
author | Mark H Weaver <mhw@netris.org> | 2019-08-29 17:19:18 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2019-08-29 17:19:18 -0400 |
commit | 0481289cbccba2646bf654f0ae49ac9c45602d5d (patch) | |
tree | cbe1351e2751e9d22c4c8add02991a3e6674f26a /Makefile.am | |
parent | c55fae452032aa4b1b63406983e9abdf70adc957 (diff) | |
parent | 9fbf4d2a52d4d3e01059f3432bb3f78182b5a822 (diff) | |
download | guix-0481289cbccba2646bf654f0ae49ac9c45602d5d.tar guix-0481289cbccba2646bf654f0ae49ac9c45602d5d.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index bd27d0079f..09e252f7b7 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. ## ## -------------- ## |