[PATCH] Makefile: respect $LINGUAS variable on selecting .mo files to install

2012-09-14 Thread Nguyễn Thái Ngọc Duy

Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 On Fri, Sep 14, 2012 at 6:35 PM, Nguyen Thai Ngoc Duy pclo...@gmail.com 
wrote:
  We should honor LINGUAS variable on installation. Only languages
  listed in that variable are installed. Many if not most of projects do
  that already.

 And here is a try.

 Makefile | 4 
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 56301dc..eeba645 100644
--- a/Makefile
+++ b/Makefile
@@ -2437,7 +2437,11 @@ po/git.pot: $(LOCALIZED_C)
 
 pot: po/git.pot
 
+ifdef LINGUAS
+POFILES := $(shell sh -c ls $(patsubst %,po/%.po,$(LINGUAS)) 2/dev/null)
+else
 POFILES := $(wildcard po/*.po)
+endif
 MOFILES := $(patsubst po/%.po,po/build/locale/%/LC_MESSAGES/git.mo,$(POFILES))
 
 ifndef NO_GETTEXT
-- 
1.7.12.403.gce5cf6f.dirty

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Makefile: respect $LINGUAS variable on selecting .mo files to install

2012-09-14 Thread Michael J Gruber
Nguyễn Thái Ngọc Duy venit, vidit, dixit 14.09.2012 14:40:
 
 Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
 ---
  On Fri, Sep 14, 2012 at 6:35 PM, Nguyen Thai Ngoc Duy pclo...@gmail.com 
 wrote:
   We should honor LINGUAS variable on installation. Only languages
   listed in that variable are installed. Many if not most of projects do
   that already.
 
  And here is a try.
 
  Makefile | 4 
  1 file changed, 4 insertions(+)
 
 diff --git a/Makefile b/Makefile
 index 56301dc..eeba645 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -2437,7 +2437,11 @@ po/git.pot: $(LOCALIZED_C)
  
  pot: po/git.pot
  
 +ifdef LINGUAS
 +POFILES := $(shell sh -c ls $(patsubst %,po/%.po,$(LINGUAS)) 2/dev/null)
 +else
  POFILES := $(wildcard po/*.po)
 +endif
  MOFILES := $(patsubst 
 po/%.po,po/build/locale/%/LC_MESSAGES/git.mo,$(POFILES))
  
  ifndef NO_GETTEXT
 

While that may be worthwhile if LINGUAS is some sort of standard I don't
think it relates to the discussion at hand. The problem is not the set
to choose from but the choice and the specificity of the choice (which
parts of the code does it affect).

Michael
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html