(env)
| 23 | |
| 24 | |
| 25 | def generate(env): |
| 26 | env['COCONUT'] = _detect(env) |
| 27 | env['COCONUTFLAGS'] = [] |
| 28 | |
| 29 | coconut_compiler = Builder( |
| 30 | action='"$COCONUT" $COCONUTFLAGS $SOURCE $TARGET', |
| 31 | src_suffix='.coco', |
| 32 | suffix='.py', |
| 33 | ) |
| 34 | |
| 35 | env.Append(BUILDERS={'Coconut': coconut_compiler}) |
| 36 | |
| 37 | def exists(env): |
| 38 | return env.Detect('coconut') |