build: add test for valid po files (msgfmt -vc)

(cherry picked from commit 97c1bed37e)
(cherry picked from commit a26ea9a634)
This commit is contained in:
Thomas Haller 2020-09-07 14:46:55 +02:00
parent 67bb9896b3
commit 84f9cbabd2
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -5170,6 +5170,20 @@ include Makefile.examples
###############################################################################
check-po-msgfmt:
@echo "check-po-msgfmt: check $(top_srcdir)/po/*.po files with msgfmt -vc"
@for f in "$(top_srcdir)/po"/*.po ; do \
if ! msgfmt -vc "$$f" &>/dev/null ; then \
echo "invalid po file: msgfmt -vc $$f" ; \
msgfmt -vc "$$f" ; \
exit 1 ; \
fi ; \
done
check_local += check-po-msgfmt
###############################################################################
check-local: $(check_local)
dist-hook: $(dist_hook)