From 21597d3caad8c94996de05e5d426178966a17860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 5 Jun 2020 13:32:09 +0100 Subject: [PATCH] po: fix update-po target to take account of libvirt.pot in srcdir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that we're storing libvirt.pot in git, it will be in srcdir instead of builddir. Weblate is responsible for running msgmerge when the .pot file changes, so add a warning that this target is not for general usage. Reviewed-by: Pavel Hrdina Signed-off-by: Daniel P. Berrangé --- po/Makefile.am | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/po/Makefile.am b/po/Makefile.am index 97e05a32f6..95294aa12e 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -43,13 +43,16 @@ SED_PO_FIXUP_ARGS = \ update-gmo: $(GMOFILES) +# The results of this target should not be committed to Git. The Weblate +# service is responsible for updating .po files when the .pot is changed. update-po: $(POTFILE) + cd $(srcdir) && \ for lang in $(LANGS); do \ echo "Minimizing $$lang content" && \ $(MSGMERGE) --no-location --no-fuzzy-matching --sort-output \ $$lang.po $(POTFILE) | \ - $(SED) $(SED_PO_FIXUP_ARGS) > $(srcdir)/$$lang.po-t && \ - mv $$lang.po-t $$lang.po + $(SED) $(SED_PO_FIXUP_ARGS) > $$lang.po-t && \ + mv $$lang.po-t $$lang.po ; \ done $(POTFILE): POTFILES