From 3e50ecec988a22ba997b4d5995c44674405be4c4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 10 May 2016 17:16:06 +1000 Subject: [PATCH] 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 --- po/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.47.2