Author: loonycyborg
Date: Tue Sep 30 18:56:35 2008
New Revision: 29791

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29791&view=rev
Log:
Refactored some code in installation section.

Modified:
    trunk/SConstruct

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=29791&r1=29790&r2=29791&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Tue Sep 30 18:56:35 2008
@@ -400,20 +400,13 @@
 # and doc files.
 #
 
-env = env.Clone()
 for d in installdirs:
-    env[d] = os.path.join(env["destdir"], env[d].lstrip("/"))
-bindir = env['bindir']
-pythonlib = env['python_site_packages_dir']
-datadir = env['datadir']
-docdir = env['docdir']
+    exec d + ' = os.path.join(env["destdir"], env[d].lstrip("/"))'
 installable_subs = Split('data fonts images sounds')
 if env['nls']:
     installable_subs.append("translations")
 if env['nls'] and env['PLATFORM'] != 'win32':
     installable_subs.append("locales")
-fifodir = env['fifodir']
-mandir = env["mandir"]
 clientside = filter(lambda x : x, [wesnoth, wesnoth_editor, cutter, exploder])
 daemons = filter(lambda x : x, [wesnothd, campaignd])
 pythontools = Split("wmlscope wmllint wmlindent wesnoth_addon_manager")
@@ -456,14 +449,14 @@
 if have_client_prereqs and have_X and env["desktop_entry"]:
      if sys.platform == "darwin":
          env.Alias("install-wesnoth",
-            env.Install(env["icondir"],
+            env.Install(icondir,
                             "icons/wesnoth-icon-Mac.png"))
      else:
          env.Alias("install-wesnoth",
-            env.Install(env["icondir"],
+            env.Install(icondir,
                             "icons/wesnoth-icon.png"))
      env.Alias("install-wesnoth",
-         env.Install(env["desktopdir"],
+         env.Install(desktopdir,
                          "icons/wesnoth.desktop"))
 InstallLocalizedManPage("install-wesnoth", "wesnoth.6", env)
 
@@ -476,14 +469,14 @@
 if have_client_prereqs and have_X and env["desktop_entry"]:
     if sys.platform == "darwin":
         env.Alias("install-wesnoth_editor",
-            env.Install(env["icondir"],
+            env.Install(icondir,
                             "icons/wesnoth_editor-icon-Mac.png"))
     else:
         env.Alias("install-wesnoth_editor",
-            env.Install(env["icondir"],
+            env.Install(icondir,
                             "icons/wesnoth_editor-icon.png"))
     env.Alias("install-wesnoth_editor",
-        env.Install(env["desktopdir"],
+        env.Install(desktopdir,
                         "icons/wesnoth_editor.desktop"))
 InstallLocalizedManPage("install-wesnoth_editor", "wesnoth_editor.6", env)
 
@@ -491,7 +484,7 @@
 env.Alias("install-pytools", [
     env.Install(bindir,
                 map(lambda tool: 'data/tools/' + tool, pythontools)),
-    env.Install(pythonlib,
+    env.Install(python_site_packages_dir,
                 map(lambda module: 'data/tools/wesnoth/' + module, 
pythonmodules)),
     ])
 


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

Reply via email to