summaryrefslogtreecommitdiff
path: root/buildtools/wafadmin/Tools/lua.py
blob: 5b181e1310fbc065aa40fdb6e24aec2f8d756e4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python
# encoding: utf-8
# Sebastian Schlingmann, 2008
# Thomas Nagy, 2008 (ita)

import TaskGen
from TaskGen import taskgen, feature
from Constants import *

TaskGen.declare_chain(
	name = 'luac',
	rule = '${LUAC} -s -o ${TGT} ${SRC}',
	ext_in = '.lua',
	ext_out = '.luac',
	reentrant = False,
	install = 'LUADIR', # env variable
)

@feature('lua')
def init_lua(self):
	self.default_chmod = O755

def detect(conf):
	conf.find_program('luac', var='LUAC', mandatory = True)