-
Notifications
You must be signed in to change notification settings - Fork 37
/
make.lua
54 lines (46 loc) · 1.16 KB
/
make.lua
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
local lm = require "luamake"
lm:required_version "1.0"
local isWindows = lm.os == "windows"
if lm.prebuilt == nil then
print("Please use `"..(isWindows and [[.\compile\install.bat]] or [[./compile/install.sh]]).."`.")
os.exit(false)
return
end
local exe = isWindows and ".exe" or ""
lm:import "bee.lua/make.lua"
lm:copy "copy_luamake" {
inputs = "$bin/bootstrap"..exe,
outputs = "luamake"..exe,
deps = "bootstrap",
}
if isWindows then
lm:runlua "forward_lua" {
script = "compile/lua/forward_lua.lua",
args = { "@bee.lua/3rd/lua/", "$out", "luamake.exe" },
inputs = {
"bee.lua/3rd/lua/lua.h",
"bee.lua/3rd/lua/lauxlib.h",
"bee.lua/3rd/lua/lualib.h",
},
outputs = "compile/lua/forward_lua.c",
deps = "copy_luamake",
}
lm:dll "lua54" {
sources = "compile/lua/forward_lua.c",
}
lm:copy "copy_lua54" {
inputs = "$bin/lua54.dll",
outputs = "tools/lua54.dll",
deps = "lua54"
}
end
lm:phony "notest" {
deps = {
"copy_luamake",
isWindows and "copy_lua54",
}
}
lm:default {
"test",
"notest",
}