Author: loonycyborg
Date: Thu Oct 16 23:58:53 2008
New Revision: 30217
URL: http://svn.gna.org/viewcvs/wesnoth?rev=30217&view=rev
Log:
Converted remaining installation productions to use InstallData.
Modified:
trunk/SConstruct
trunk/scons/install.py
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=30217&r1=30216&r2=30217&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Thu Oct 16 23:58:53 2008
@@ -443,20 +443,15 @@
env.InstallData("mandir", component, os.path.join("doc", "man", component
+ ".6"), "man6")
for lingua in linguas:
manpage = os.path.join("doc", "man", lingua, component + ".6")
- if os.path.exists(manpage):
- env.InstallData("mandir", component, manpage, os.path.join(lingua,
"man6"))
+ env.InstallData("mandir", component, manpage, os.path.join(lingua,
"man6"))
# Now the actual installation productions
-install_data = env.InstallFiltered(Dir(env.subst(datadir)),
- map(Dir, installable_subs))
-
-install_manual = env.InstallFiltered(Dir(env.subst(docdir)),
- Dir("doc/manual"))
-env.AlwaysBuild(install_data, install_manual)
+env.InstallData("datadir", "wesnoth", map(Dir, installable_subs))
+env.InstallData("docdir", "wesnoth", Dir("doc/manual"))
# The game and associated resources
-env.Alias("install-wesnoth", [env.InstallWithSuffix(bindir, wesnoth),
install_data, install_manual])
+env.Alias("install-wesnoth", env.InstallWithSuffix(bindir, wesnoth))
InstallManpages(env, "wesnoth")
if have_client_prereqs and have_X and env["desktop_entry"]:
if sys.platform == "darwin":
@@ -466,12 +461,8 @@
env.InstallData("desktopdir", "wesnoth", "icons/wesnoth.desktop")
# Python tools
-env.Alias("install-pytools", [
- env.Install(bindir,
- map(lambda tool: 'data/tools/' + tool, pythontools)),
- env.Install(python_site_packages_dir,
- map(lambda module: 'data/tools/wesnoth/' + module,
pythonmodules)),
- ])
+env.InstallData("bindir", "pytools", map(lambda tool: os.path.join("data",
"tools", tool), pythontools))
+env.InstallData("python_site_packages_dir", "pytools", map(lambda module:
os.path.join("data", "tools", "wesnoth", module), pythonmodules))
# Wesnoth MP server install
install_wesnothd = env.InstallWithSuffix(bindir, wesnothd)
Modified: trunk/scons/install.py
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/scons/install.py?rev=30217&r1=30216&r2=30217&view=diff
==============================================================================
--- trunk/scons/install.py (original)
+++ trunk/scons/install.py Thu Oct 16 23:58:53 2008
@@ -70,8 +70,19 @@
lambda dest, src: 'Hardlinking %s to %s' % (src,
dest))
def InstallData(env, datadir, component, source, subdir = ""):
- installdir = os.path.join(env["destdir"], env[datadir].lstrip("/"), subdir)
- env.Alias("install-" + component, env.Install(installdir, source))
+ installdir = Dir(env.subst(os.path.join(env["destdir"],
env[datadir].lstrip("/"), subdir)))
+ sources = map(str, Flatten(env.subst(source)))
+ dirs = []
+ for source in sources:
+ if os.path.exists(source):
+ if os.path.isfile(source):
+ env.Alias("install-" + component, env.Install(installdir,
source))
+ else:
+ dirs.append(Dir(source))
+ if dirs:
+ install = env.InstallFiltered(installdir, dirs)
+ AlwaysBuild(install)
+ env.Alias("install-" + component, install)
def generate(env):
#env.AddMethod(InstallWithSuffix)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits