blob: 5fd10c77649f19cc67e31e70c3100d4ee6ad11ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
Import('env')
def tolua_generator(source, target, env, for_signature):
name = str(source[0]).rsplit('/', 1)[-1].rsplit('.' , 1)[0]
return 'tolua++ -o %s -H %s -n %s %s' % (target[0], target[1], name, source[0])
def tolua_emitter(target, source, env):
name = target.pop()
target.append('tolua_%s.cpp' % name)
target.append('tolua_%s.h' % name)
return target, source
tolua_bld = Builder(
generator = tolua_generator,
emitter = tolua_emitter,
src_suffix = '.pkg',
)
env.Append(BUILDERS = {'tolua': tolua_bld})
env.tolua('test')
# vim: syn=python
|