Rev | Line | |
---|
[1184] | 1 | import SCons
|
---|
| 2 |
|
---|
[1431] | 3 | try:
|
---|
| 4 | from SCons.Environment import installFunc
|
---|
| 5 | except ImportError:
|
---|
| 6 | from SCons.Tool.install import installFunc
|
---|
| 7 |
|
---|
[1184] | 8 | def no_output(target, source, env):
|
---|
| 9 | return ""
|
---|
| 10 |
|
---|
| 11 | def 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(
|
---|
[1431] | 34 | action = env.Action(installFunc, no_output),
|
---|
[1184] | 35 | multi=1
|
---|
| 36 | )
|
---|
| 37 |
|
---|
| 38 | env.Append(BUILDERS = {
|
---|
| 39 | 'QuietInstaller': quietinstaller_builder
|
---|
| 40 | })
|
---|
| 41 |
|
---|
| 42 | def exists(env):
|
---|
| 43 | return True
|
---|
Note:
See
TracBrowser
for help on using the repository browser.