Mercurial > parpg-core
annotate site_scons/site_tools/copyrecurse/__init__.py @ 17:15107282d9eb
Redefined SYSCONFDIR installation path variable so that it appends APPNAME.
* Although this deviates from GNU standards this relatively minor change makes it easier to write paths that are portable to Windows.
author | M. George Hansen <technopolitica@gmail.com> |
---|---|
date | Thu, 09 Jun 2011 21:40:51 -1000 |
parents | 4706e0194af3 |
children |
rev | line source |
---|---|
11
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
1 import os |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
2 |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
3 from .CopyRecurseAction import copyRecurseAction |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
4 |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
5 def emit(target, source, env): |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
6 target = [env.fs.Entry(os.path.join(str(target[0]), str(source[0])))] |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
7 return target, source |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
8 |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
9 def generate(env): |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
10 CopyRecurseBuilder = env.Builder( |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
11 action=copyRecurseAction, |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
12 emitter=emit, |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
13 source_factory=env.fs.Entry, |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
14 target_factory=env.fs.Dir, |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
15 multi=1, |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
16 ) |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
17 env.Append(BUILDERS={'CopyRecurse': CopyRecurseBuilder}) |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
18 |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
19 def exists(env): |
4706e0194af3
Various improvements to the build process including support for self-contained builds.
M. George Hansen <technopolitica@gmail.com>
parents:
diff
changeset
|
20 return True |