aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/build_Lua.lua
blob: 1adad976744b97097adfe45a77dc6b11967d368a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env luajit

local dir = ...

if 'nil' == type(dir) then
  local build, err = loadfile('../../build.lua')
  if build then
    setfenv(build, getfenv(2))
    build(2)
  else
    print("ERROR - " .. err)
  end
  dir = workingDir
end

baseDir = '/usr/local/'

cloneGit('luajit-2.0', '.', 'luajit.org/git', '')
runCommand('LuaJIT', 'luajit-2.0', 'make clean')
runCommand(nil, 'luajit-2.0', 'make amalg PREFIX=' .. baseDir)
runCommand(nil, 'luajit-2.0', 'sudo make install PREFIX=' .. baseDir)
-- This link prevents linking to LuaJIT when it works, the Ubuntu one supplies a broken link instead, which also "works".
runCommand(nil, 'luajit-2.0', 'sudo rm ' .. baseDir .. '/lib/libluajit-5.1.so')