gui: Fix compatibility with older gettext.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 20 Jun 2020 21:37:06 +0000 (21:37 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 20 Jun 2020 21:40:30 +0000 (21:40 +0000)
Older gettext does not recognize the metainfo.xml extension, only
appdata.xml.  This commit allows msgfmt to work with such older setups.

CC: Friedrich Beckmann <friedrich.beckmann@gmx.de>
Fixes: 86c5d611b3f2 ("metainfo.xml: changed id to org.fsf.pspp, added more information")
src/ui/gui/automake.mk

index 9f2a20f9a71d472f6db30e1b7b1e1b880d999f02..382202cd7cf30ae1f721ea16344d532271b61c43 100644 (file)
@@ -378,7 +378,8 @@ PHONY += yelp-check
 AM_CPPFLAGS += -Isrc
 
 src/ui/gui/org.fsf.pspp.metainfo.xml: src/ui/gui/org.fsf.pspp.metainfo.xml.in $(POFILES)
-       $(AM_V_GEN)$(MSGFMT) --xml --template $< -o $@ -d $(top_srcdir)/po
+       $(AM_V_GEN)$(MSGFMT) --xml --template $< -o $@ -d $(top_srcdir)/po || \
+         $(MSGFMT) -L appdata --xml --template $< -o $@ -d $(top_srcdir)/po
 
 src/ui/gui/org.fsf.pspp.desktop: src/ui/gui/org.fsf.pspp.desktop.in $(POFILES)
        $(AM_V_GEN)$(MSGFMT) --desktop --template $< -o $@ -d $(top_srcdir)/po