Author: loonycyborg
Date: Thu Oct  9 16:37:59 2008
New Revision: 29976

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29976&view=rev
Log:
Made scons try to generate dummy locales only if localedef is found.

Modified:
    trunk/SConstruct

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=29976&r1=29975&r2=29976&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Thu Oct  9 16:37:59 2008
@@ -374,8 +374,10 @@
 # Dummy locales
 #
 
-if env["nls"] and env['PLATFORM'] != 'win32':
-    env.Command(Dir("locales/C"), [], "-mkdir -p locales;echo | localedef -c 
\"$TARGET\" 2> /dev/null")
+env["LOCALEDEF"] = WhereIs("localedef")
+env["dummy_locales"] = env["nls"] and env["LOCALEDEF"]
+if env["dummy_locales"]:
+    env.Command(Dir("locales/C"), [], "-mkdir -p locales;echo | $LOCALEDEF -c 
\"$TARGET\" 2> /dev/null")
     language_cfg_re = re.compile(r"data/languages/(.*)\.cfg")
     language_cfgs = glob("data/languages/*.cfg")
     languages = Flatten(map(language_cfg_re.findall, language_cfgs))
@@ -404,7 +406,7 @@
 installable_subs = Split('data fonts images sounds')
 if env['nls']:
     installable_subs.append("translations")
-if env['nls'] and env['PLATFORM'] != 'win32':
+if env["dummy_locales"]:
     installable_subs.append("locales")
 clientside = filter(lambda x : x, [wesnoth, cutter, exploder])
 daemons = filter(lambda x : x, [wesnothd, campaignd])


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to