Author: loonycyborg
Date: Fri Oct 15 03:24:24 2010
New Revision: 47050

URL: http://svn.gna.org/viewcvs/wesnoth?rev=47050&view=rev
Log:
Made scons not pass -DPREFERENCES_DIR= by default.

Pass it only if prefsdir or version_suffix is set. That is consistent
with other buildsystems and enables XDG compliant locations for user
configuration, user data and cache if prefsdir/version_suffix are not
set.

Modified:
    trunk/SConstruct
    trunk/src/SConscript

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=47050&r1=47049&r2=47050&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Fri Oct 15 03:24:24 2010
@@ -75,7 +75,7 @@
     BoolVariable('notifications', 'Enable support for desktop notifications', 
True),
     BoolVariable('nls','enable compile/install of gettext message 
catalogs',True),
     PathVariable('prefix', 'autotools-style installation prefix', 
"/usr/local", PathVariable.PathAccept),
-    PathVariable('prefsdir', 'user preferences directory', 
".wesnoth$version_suffix", PathVariable.PathAccept),
+    PathVariable('prefsdir', 'user preferences directory', "", 
PathVariable.PathAccept),
     PathVariable('destdir', 'prefix to add to all installation paths.', "/", 
PathVariable.PathAccept),
     BoolVariable('prereqs','abort if prerequisites cannot be detected',True),
     ('program_suffix', 'suffix to append to names of installed 
programs',"$version_suffix"),

Modified: trunk/src/SConscript
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/SConscript?rev=47050&r1=47049&r2=47050&view=diff
==============================================================================
--- trunk/src/SConscript (original)
+++ trunk/src/SConscript Fri Oct 15 03:24:24 2010
@@ -58,7 +58,9 @@
         filesystem_env.Append(CPPDEFINES = "LOCALEDIR='\"$localedirname\"'")
         if not os.path.isabs(env['localedirname']):
             filesystem_env.Append(CPPDEFINES = "HAS_RELATIVE_LOCALEDIR")
-    if env['prefsdir']:
+    if env['version_suffix'] and not env['prefsdir']:
+        filesystem_env['prefsdir'] = ".wesnoth$version_suffix"
+    if filesystem_env['prefsdir']:
         filesystem_env.Append(CPPDEFINES = "PREFERENCES_DIR='\"$prefsdir\"'")
 
 libwesnoth_core_sources.extend([


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

Reply via email to