summaryrefslogtreecommitdiff
path: root/third_party/waf/wafadmin/Tools/lua.py
blob: 8a6c1f46e796ca4f71e0f053f7a2666ea9339e6b (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
#!/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)