From: Mike Frysinger Date: Tue, 10 May 2016 07:16:06 +0000 (+1000) Subject: po: respect LINGUAS build setting X-Git-Tag: v4.7.0-rc1~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e50ecec988a22ba997b4d5995c44674405be4c4;p=thirdparty%2Fxfsprogs-dev.git po: respect LINGUAS build setting It is common gettext practice to limit the translations a particular package will include by setting the LINGUAS environment variable. Signed-off-by: Mike Frysinger Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/po/Makefile b/po/Makefile index edf92ad49..a5250b349 100644 --- a/po/Makefile +++ b/po/Makefile @@ -6,7 +6,10 @@ TOPDIR = .. include $(TOPDIR)/include/builddefs POTHEAD = $(PKG_NAME).pot -LINGUAS = de pl +# If the user has requested a specific set of translations, only build those. +SUPPORTED_LINGUAS = $(patsubst %.po,%,$(wildcard *.po)) +LINGUAS ?= $(SUPPORTED_LINGUAS) +LINGUAS := $(filter $(SUPPORTED_LINGUAS),$(LINGUAS)) LSRCFILES = $(LINGUAS:%=%.po) LDIRT = $(POTHEAD)