Last change
on this file since 1185 was 1184, checked in by mar637, 18 years ago |
complete rework of install target, added data install, and also building a distribution archive
|
File size:
1.0 KB
|
Rev | Line | |
---|
[1184] | 1 | import SCons
|
---|
| 2 |
|
---|
| 3 | def no_output(target, source, env):
|
---|
| 4 | return ""
|
---|
| 5 |
|
---|
| 6 | def generate(env):
|
---|
| 7 |
|
---|
| 8 | def QInstall(dir, source):
|
---|
| 9 | dnodes = env.arg2nodes(dir, env.fs.Dir)
|
---|
| 10 | sources = env.arg2nodes(source, env.fs.File)
|
---|
| 11 | tgt = []
|
---|
| 12 | for dnode in dnodes:
|
---|
| 13 | for src in sources:
|
---|
| 14 | target = env.fs.File(src.name, dnode)
|
---|
| 15 | tgt.extend(env.QuietInstaller(target, src))
|
---|
| 16 | return tgt
|
---|
| 17 | env.QInstall = QInstall
|
---|
| 18 |
|
---|
| 19 | def QInstallAs(target, source):
|
---|
| 20 | result = []
|
---|
| 21 | sources = env.arg2nodes(source, env.fs.File)
|
---|
| 22 | targets = env.arg2nodes(target, env.fs.File)
|
---|
| 23 | for src, tgt in map(lambda x, y: (x, y), sources, targets):
|
---|
| 24 | result.extend(env.QuietInstaller(tgt, src))
|
---|
| 25 |
|
---|
| 26 | env.QInstallAs = QInstallAs
|
---|
| 27 |
|
---|
| 28 | quietinstaller_builder = env.Builder(
|
---|
| 29 | action = env.Action(SCons.Environment.installFunc, no_output),
|
---|
| 30 | multi=1
|
---|
| 31 | )
|
---|
| 32 |
|
---|
| 33 | env.Append(BUILDERS = {
|
---|
| 34 | 'QuietInstaller': quietinstaller_builder
|
---|
| 35 | })
|
---|
| 36 |
|
---|
| 37 | def exists(env):
|
---|
| 38 | return True
|
---|
Note:
See
TracBrowser
for help on using the repository browser.