Author: loonycyborg
Date: Mon Apr 28 16:39:07 2008
New Revision: 26202

URL: http://svn.gna.org/viewcvs/wesnoth?rev=26202&view=rev
Log:
Added "destdir" option to scons recipe.

Modified:
    trunk/SConstruct

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=26202&r1=26201&r2=26202&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Mon Apr 28 16:39:07 2008
@@ -43,6 +43,7 @@
 opts.Add(BoolOption('nls','enable compile/install of gettext message 
catalogs',True))
 opts.Add(PathOption('prefix', 'autotools-style installation prefix', 
"/usr/local"))
 opts.Add(PathOption('prefsdir', 'user preferences directory', ".wesnoth", 
PathOption.PathAccept))
+opts.Add(PathOption('destdir', 'prefix to add to all installation paths.', "", 
PathOption.PathAccept))
 opts.Add(BoolOption('prereqs','abort if prerequisites cannot be 
detected',True))
 opts.Add(BoolOption('profile', 'Set to build for debugging', False))
 #opts.Add('program_suffix', 'suffix to append to names of installed 
programs',"")
@@ -448,6 +449,9 @@
 
 env.Append(CPPDEFINES = "WESNOTH_PATH='\"%s\"'" % env['datadir'])
 
+for d in ("bindir", "datadir", "fifodir", "icondir", "desktopdir"):
+    env[d] = os.path.join("/", env["destdir"], env[d].lstrip("/"))
+
 if 'CXXFLAGS' in os.environ:
     env.Append(CXXFLAGS = os.environ['CXXFLAGS'])
 


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

Reply via email to