summaryrefslogtreecommitdiff
path: root/scripting/SConscript
blob: eaf9f21245bd06b91837b9b82eafbdafd3b0731a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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[1], target[2], name, source[0])

def tolua_emitter(target, source, env):
	target.append('tolua_%s.cpp' % target[0])
	target.append('tolua_%s.h' % target[0])
	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