Mark Slee | e2bd58d | 2006-10-31 05:09:24 +0000 | [diff] [blame] | 1 | from SCons.Builder import Builder |
2 | |||||
3 | def scons_env(env): | ||||
4 | cppbuild = Builder(action = 'thrift --cpp $SOURCE') | ||||
5 | env.Append(BUILDERS = {'ThriftCpp' : cppbuild}) | ||||
6 | |||||
7 | def gen_cpp(env, dir, file): | ||||
8 | scons_env(env) | ||||
9 | suffixes = ['_types.h', '_types.cpp'] | ||||
10 | targets = map(lambda s: 'gen-cpp/' + file + s, suffixes) | ||||
11 | return env.ThriftCpp(targets, dir+file+'.thrift') |