aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-07-21 20:11:58 +1000
committerDavid Walter Seikel2016-07-21 20:11:58 +1000
commit137d6cea40e5e0263d7f38a125fe45b21b73e527 (patch)
tree396abe1d35e48cfa47406cd136ed831fe3e6d381
parentClean up last commit. (diff)
downloadSledjHamr-137d6cea40e5e0263d7f38a125fe45b21b73e527.zip
SledjHamr-137d6cea40e5e0263d7f38a125fe45b21b73e527.tar.gz
SledjHamr-137d6cea40e5e0263d7f38a125fe45b21b73e527.tar.bz2
SledjHamr-137d6cea40e5e0263d7f38a125fe45b21b73e527.tar.xz
Add script for building Lua (LuaJIT actually)
-rwxr-xr-xsrc/others/build_Lua.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/others/build_Lua.lua b/src/others/build_Lua.lua
new file mode 100755
index 0000000..1adad97
--- /dev/null
+++ b/src/others/build_Lua.lua
@@ -0,0 +1,23 @@
1#!/usr/bin/env luajit
2
3local dir = ...
4
5if 'nil' == type(dir) then
6 local build, err = loadfile('../../build.lua')
7 if build then
8 setfenv(build, getfenv(2))
9 build(2)
10 else
11 print("ERROR - " .. err)
12 end
13 dir = workingDir
14end
15
16baseDir = '/usr/local/'
17
18cloneGit('luajit-2.0', '.', 'luajit.org/git', '')
19runCommand('LuaJIT', 'luajit-2.0', 'make clean')
20runCommand(nil, 'luajit-2.0', 'make amalg PREFIX=' .. baseDir)
21runCommand(nil, 'luajit-2.0', 'sudo make install PREFIX=' .. baseDir)
22-- This link prevents linking to LuaJIT when it works, the Ubuntu one supplies a broken link instead, which also "works".
23runCommand(nil, 'luajit-2.0', 'sudo rm ' .. baseDir .. '/lib/libluajit-5.1.so')