3 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
7 # Sebastian Schlingmann, 2008
8 # Thomas Nagy, 2008-2016 (ita)
13 Compile *.lua* files into *.luac*::
17 conf.env.LUADIR = '/usr/local/share/myapp/scripts/'
22 from waflib.TaskGen import extension
23 from waflib import Task
26 def add_lua(self, node):
27 tsk = self.create_task('luac', node, node.change_ext('.luac'))
28 inst_to = getattr(self, 'install_path', self.env.LUADIR and '${LUADIR}' or None)
30 self.add_install_files(install_to=inst_to, install_from=tsk.outputs)
33 class luac(Task.Task):
34 run_str = '${LUAC} -s -o ${TGT} ${SRC}'
39 Detect the luac compiler and set *conf.env.LUAC*
41 conf.find_program('luac', var='LUAC')