[Xfce4-commits] <gigolo:master> Respect the LINGUAS environment variable when configuring the build system

Enrico Tröger noreply at xfce.org
Mon Jan 18 00:04:01 CET 2010


Updating branch refs/heads/master
         to e8e5b30a18d3bfac3f3b3a7e1d74f80add23f618 (commit)
       from c297ecf31ead7ce3b12c17767a2463af88744396 (commit)

commit e8e5b30a18d3bfac3f3b3a7e1d74f80add23f618
Author: Enrico Tröger <enrico at xfce.org>
Date:   Sun Jan 17 18:49:19 2010 +0100

    Respect the LINGUAS environment variable when configuring the build system

 wscript |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/wscript b/wscript
index 1cfccc8..0889e7d 100644
--- a/wscript
+++ b/wscript
@@ -58,6 +58,9 @@ def configure(conf):
 
 	conf.write_config_header('config.h')
 
+	if 'LINGUAS' in os.environ:
+		conf.env['LINGUAS'] = os.environ['LINGUAS']
+
 	# debug flags
 	if Options.options.debug:
 		conf.env.append_value('CCFLAGS', '-g -O0 -DDEBUG '.split())
@@ -85,10 +88,13 @@ def set_options(opt):
 @feature('intltool_po')
 def write_linguas_file(self):
 	linguas = ''
-	files = os.listdir('%s/po' % self.path.abspath())
-	for f in files:
-		if f.endswith('.po'):
-			linguas += '%s ' % f[:-3]
+	if 'LINGUAS' in Build.bld.env:
+		linguas = Build.bld.env['LINGUAS']
+	else:
+		files = os.listdir('%s/po' % self.path.abspath())
+		for f in files:
+			if f.endswith('.po'):
+				linguas += '%s ' % f[:-3]
 	f = open("po/LINGUAS", "w")
 	f.write('# This file is autogenerated. Do not edit.\n%s\n' % linguas)
 	f.close()



More information about the Xfce4-commits mailing list