test/Actions/pre-post-fixture/work3/SConstruct
raw| 1 | # SPDX-License-Identifier: MIT |
| 2 | # |
| 3 | # Copyright The SCons Foundation |
| 4 | |
| 5 | def pre(target, source, env): |
| 6 | pass |
| 7 | |
| 8 | def post(target, source, env): |
| 9 | pass |
| 10 | |
| 11 | def build(target, source, env): |
| 12 | with open(target[0], 'wb') as f: |
| 13 | f.write(b'build()\n') |
| 14 | |
| 15 | DefaultEnvironment(tools=[]) |
| 16 | env = Environment(tools=[]) |
| 17 | AddPreAction('dir', pre) |
| 18 | AddPostAction('dir', post) |
| 19 | env.Command('dir/file', [], build) |