[libvirt] [PATCH 13/25] po: rewrite the way how we generate files

Ján Tomko jtomko at redhat.com
Tue Oct 22 11:23:40 UTC 2019


On Mon, Oct 21, 2019 at 10:00:38AM +0200, Pavel Hrdina wrote:
>There was no need to handle files for translation from build directory
>but that will change with following patches where we will stop
>generating source files into source directory.
>
>In order to have them included for translation we have to prefix each
>file with SRCDIR or BUILDDIR.
>
>Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
>---
> po/Makefile.am |  14 ++-
> po/POTFILES    | 320 -------------------------------------------------
> po/POTFILES.in | 320 +++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 329 insertions(+), 325 deletions(-)
> delete mode 100644 po/POTFILES
> create mode 100644 po/POTFILES.in
>
>diff --git a/po/Makefile.am b/po/Makefile.am
>index 8ddb1432f0..82798eeb03 100644
>--- a/po/Makefile.am
>+++ b/po/Makefile.am
>@@ -15,16 +15,21 @@ LANGS := \
> 	uk ur vi wba yo zh_CN zh_HK zh_TW zu
>
>
>-POTFILE_DEPS := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES)
>+POTFILES_IN = $(srcdir)/POTFILES.in
>+POTFILES: $(POTFILES_IN)
>+	$(AM_V_GEN) cat $(POTFILES_IN) | \
>+		$(SED) 's|@SRCDIR@|$(top_srcdir)|' | \
>+		$(SED) 's|@BUILDDIR@|$(top_builddir)|' > $@

syntax-check forbids the use of @VAR@ in Makefiles,
most of the sed commands use [@] to work around it.

Jano

>+POTFILE_DEPS = $(shell cat POTFILES)
> POTFILE := $(DOMAIN).pot
> POMINIFILES := $(LANGS:%=%.mini.po)
> POFILES := $(LANGS:%=%.po)
> GMOFILES := $(LANGS:%=%.gmo)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20191022/90eadd25/attachment-0001.sig>


More information about the libvir-list mailing list