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

Otherwise, the test generates an "messages.mo" file.

Fixes: 97c1bed37e ('build: add test for valid po files (msgfmt -vc)')
This commit is contained in:
Thomas Haller 2020-09-07 16:45:44 +02:00
parent ec12912908
commit ad55cf86e8
No known key found for this signature in database
GPG Key ID: 29C2366E4DFC5728

View File

@ -5304,9 +5304,9 @@ endif
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" ; \
if ! msgfmt -vc "$$f" -o /dev/null &>/dev/null ; then \
echo "invalid po file: msgfmt -vc $$f -o /dev/null" ; \
msgfmt -vc "$$f" -o /dev/null ; \
exit 1 ; \
fi ; \
done