source: branches/plotter2/scons/quietinstall.py@ 3037

Last change on this file since 3037 was 1431, checked in by Malte Marquarding, 16 years ago

work with scons >= 0.98

File size: 1.1 KB
Line 
1import SCons
2
3try:
4 from SCons.Environment import installFunc
5except ImportError:
6 from SCons.Tool.install import installFunc
7
8def no_output(target, source, env):
9 return ""
10
11def generate(env):
12
13 def QInstall(dir, source):
14 dnodes = env.arg2nodes(dir, env.fs.Dir)
15 sources = env.arg2nodes(source, env.fs.File)
16 tgt = []
17 for dnode in dnodes:
18 for src in sources:
19 target = env.fs.File(src.name, dnode)
20 tgt.extend(env.QuietInstaller(target, src))
21 return tgt
22 env.QInstall = QInstall
23
24 def QInstallAs(target, source):
25 result = []
26 sources = env.arg2nodes(source, env.fs.File)
27 targets = env.arg2nodes(target, env.fs.File)
28 for src, tgt in map(lambda x, y: (x, y), sources, targets):
29 result.extend(env.QuietInstaller(tgt, src))
30
31 env.QInstallAs = QInstallAs
32
33 quietinstaller_builder = env.Builder(
34 action = env.Action(installFunc, no_output),
35 multi=1
36 )
37
38 env.Append(BUILDERS = {
39 'QuietInstaller': quietinstaller_builder
40 })
41
42def exists(env):
43 return True
Note: See TracBrowser for help on using the repository browser.