From 84f9cbabd218ae972a39d6c2ff75766239a4dfdd Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 7 Sep 2020 14:46:55 +0200 Subject: [PATCH] build: add test for valid po files (msgfmt -vc) (cherry picked from commit 97c1bed37e46906f5450f53333e903c679f47ffe) (cherry picked from commit a26ea9a634054958ed4f702c0d750dfa2dccf07a) --- Makefile.am | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile.am b/Makefile.am index 883bafc684..2030ba1ead 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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)