po: Don't fail installation if parts of translated documentation are missing
authorHilko Bengen <bengen@debian.org>
Tue, 18 Oct 2016 10:35:28 +0000 (12:35 +0200)
committerHilko Bengen <bengen@debian.org>
Fri, 20 Oct 2017 19:08:12 +0000 (20:08 +0100)
Gbp-Pq: Name 0008-po-Don-t-fail-installation-if-parts-of-translated-do.patch

po/Makefile.am

index 460d491366fd9d9378dd7e3da29b47c0ce502b37..98d1d7bd51caa34c0697cc68cd6ba74f7738635e 100644 (file)
@@ -25,9 +25,9 @@ MSGID_BUGS_ADDRESS = https://bugzilla.redhat.com/enter_bug.cgi?component=libgues
 # Don't use LINGUAS (uppercase) as Gentoo defines it (RHBZ#804464).
 linguas     := ca de en_GB es eu fr gu hi ja kn ml mr nl or pa pl pt_BR ru ta te tg uk zh_CN zh_TW
 
-POTFILES    := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES)
-POTFILES_PL := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES-pl)
-POTFILES_ML := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES-ml)
+POTFILES    := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES | xargs stat -c %n 2>/dev/null)
+POTFILES_PL := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES-pl | xargs stat -c %n 2>/dev/null)
+POTFILES_ML := $(shell $(SED) 's,^,$(top_srcdir)/,' $(srcdir)/POTFILES-ml | xargs stat -c %n 2>/dev/null)
 POFILES     := $(linguas:%=%.po)
 GMOFILES    := $(linguas:%=%.gmo)
 
@@ -63,8 +63,7 @@ XGETTEXT_ARGS = \
        --copyright-holder='$(COPYRIGHT_HOLDER)' \
        --package-name="$(PACKAGE_NAME)" \
        --package-version="$(PACKAGE_VERSION)" \
-       --msgid-bugs-address="$(MSGID_BUGS_ADDRESS)" \
-       --directory=$(top_srcdir)
+       --msgid-bugs-address="$(MSGID_BUGS_ADDRESS)"
 
 # For explanation, see
 # http://mingw-users.1079350.n2.nabble.com/Getting-rid-of-xgettext-s-quot-CHARSET-quot-warning-td5620533.html
@@ -79,11 +78,9 @@ if HAVE_OCAML_GETTEXT
         \
        $(FIX_CHARSET) $@-t
 endif
-       $(XGETTEXT) -j -o $@-t $(XGETTEXT_ARGS) \
-         --files-from=$(abs_srcdir)/POTFILES
+       $(XGETTEXT) -j -o $@-t $(XGETTEXT_ARGS) $(POTFILES)
        $(FIX_CHARSET) $@-t
-       $(XGETTEXT) -j -o $@-t $(XGETTEXT_ARGS) --language=Perl \
-         --files-from=$(abs_srcdir)/POTFILES-pl
+       $(XGETTEXT) -j -o $@-t $(XGETTEXT_ARGS) --language=Perl $(POTFILES_PL)
        mv $@-t $@
 
 %.po: $(DOMAIN).pot