diff options
Diffstat (limited to 'source4/build/scons/proto.py')
-rw-r--r-- | source4/build/scons/proto.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source4/build/scons/proto.py b/source4/build/scons/proto.py new file mode 100644 index 0000000000..6a53bfb4ab --- /dev/null +++ b/source4/build/scons/proto.py @@ -0,0 +1,26 @@ +"""SCons.Tool.proto + +Tool-specific initialization for mkproto (C Proto File generator) + +""" + +import SCons.Defaults +import SCons.Scanner.C +import SCons.Util + +c_scanner = SCons.Scanner.C.CScan() + +proto_builder = SCons.Builder.Builder(action='$PROTOCOM', + src_suffix = '.idl', + suffix='.h', + scanner = c_scanner) + +def generate(env): + env['MKPROTO'] = './script/mkproto.sh' + env['PROTOCOM'] = '$MKPROTO "$PERL" -h _PROTO_H_ ${TARGETS[0]} $SOURCE' + env['BUILDERS']['ProtoHeader'] = proto_builder + +def exists(env): + return env.Detect('./script/mkproto.sh') + + |