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(a)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)