blob: 38fc2d6f48653338239bf1c1723c867aa556c4c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
"""SCons.Tool.proto
Tool-specific initialization for mkproto (C Proto File generator)
"""
import SCons.Defaults
import SCons.Util
proto_builder = SCons.Builder.Builder(action='$PROTOCOM',
src_suffix = '.c',
suffix='.h')
def generate(env):
env['MKPROTO'] = './script/mkproto.sh'
env['PROTOCOM'] = '$MKPROTO "$PERL" -h _PROTO_H_ ${TARGETS[0]} $SOURCES'
env['BUILDERS']['CProtoHeader'] = proto_builder
def exists(env):
return env.Detect('./script/mkproto.sh')
|