From 655df05500b8ae834ae58c66795dd8522925f00c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 19 Apr 2018 14:52:51 +0100 Subject: [PATCH] po: attempt to fix srcdir != builddir builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The .pot, .po and .gmo files are slightly unusual in that we generate them in the srcdir when building form git. This is because they'll be bundled in the tar archive, so a build-from-tar will see them in srcdir. Signed-off-by: Daniel P. Berrangé --- po/Makefile.am | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/po/Makefile.am b/po/Makefile.am index 676c9135dc..812c6324ac 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -16,9 +16,9 @@ LANGS := \ POTFILE_DEPS := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES) -POTFILE := $(DOMAIN).pot -POFILES := $(LANGS:%=%.po) -GMOFILES := $(LANGS:%=%.gmo) +POTFILE := $(srcdir)/$(DOMAIN).pot +POFILES := $(LANGS:%=$(srcdir)/%.po) +GMOFILES := $(LANGS:%=$(srcdir)/%.gmo) MAINTAINERCLEANFILES = $(POTFILE) $(POFILES) $(GMOFILES) @@ -71,19 +71,19 @@ pull-po: $(POTFILE) $(MAKE) update-gmo $(POTFILE): POTFILES $(POTFILE_DEPS) - $(XGETTEXT) -o $(srcdir)/$@-t $(XGETTEXT_ARGS) \ + $(XGETTEXT) -o $@-t $(XGETTEXT_ARGS) \ --files-from=$(abs_srcdir)/POTFILES $(SED) $(SED_PO_FIXUP_ARGS) < $@-t > $@ rm -f $@-t -%.po: %.mini.po $(POTFILE) +$(srcdir)/%.po: $(srcdir)/%.mini.po $(POTFILE) $(MSGMERGE) --no-fuzzy-matching $< $(POTFILE) | \ $(SED) $(SED_PO_FIXUP_ARGS) > $@ -%.gmo: %.po - rm -f $(srcdir)/$@ $@-t - $(MSGFMT) -c -o $@-t $(srcdir)/$< - mv $@-t $(srcdir)/$@ +$(srcdir)/%.gmo: $(srcdir)/%.po + rm -f $@ $@-t + $(MSGFMT) -c -o $@-t $< + mv $@-t $@ .PRECIOUS: $(POTFILE) $(POFILES)