summaryrefslogtreecommitdiff
path: root/source4/build/scons/proto.py
blob: ef9d1d11b277db676ef78160c4fdae24e7c59429 (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" ${TARGETS[0]} $SOURCES'
	env['BUILDERS']['CProtoHeader'] = proto_builder

def exists(env):
	return env.Detect('./script/mkproto.sh')