summaryrefslogtreecommitdiff
path: root/make.lua
diff options
context:
space:
mode:
Diffstat (limited to 'make.lua')
-rw-r--r--make.lua43
1 files changed, 30 insertions, 13 deletions
diff --git a/make.lua b/make.lua
index 638c6b90..f6a96e68 100644
--- a/make.lua
+++ b/make.lua
@@ -1,6 +1,12 @@
local lm = require 'luamake'
+local platform = require 'bee.platform'
+local fs = require 'bee.filesystem'
+local exe = platform.OS == 'Windows' and ".exe" or ""
-lm.EXE = "lua"
+lm.bindir = "bin/"..platform.OS
+
+lm.EXE_NAME = "lua-language-server"
+lm.EXE_DIR = lm.bindir
lm.EXE_RESOURCE = "../../make/lua-language-server.rc"
lm:import "3rd/bee.lua/make.lua"
@@ -14,23 +20,34 @@ lm:lua_dll 'lpeglabel' {
}
lm:build 'install' {
- '$luamake', 'lua', 'make/install.lua', lm.builddir,
+ '$luamake', 'lua', 'make/install.lua',
+}
+
+lm:copy "copy_bootstrap" {
+ input = "make/bootstrap.lua",
+ output = lm.bindir.."/main.lua",
+}
+
+lm:build "bee-test" {
+ lm.bindir.."/"..lm.EXE_NAME..exe, "3rd/bee.lua/test/test.lua",
+ pool = "console",
deps = {
- 'lua',
- 'lpeglabel',
- 'bee',
- }
+ lm.EXE_NAME,
+ "copy_bootstrap"
+ },
}
-local fs = require 'bee.filesystem'
-local pf = require 'bee.platform'
-local exe = pf.OS == 'Windows' and ".exe" or ""
-lm:build 'unittest' {
- fs.path 'bin' / pf.OS / ('lua-language-server' .. exe), 'test.lua', '-E',
+lm:build 'unit-test' {
+ lm.bindir.."/"..lm.EXE_NAME..exe, 'test.lua',
pool = "console",
deps = {
- 'install',
+ "bee-test",
+ "lpeglabel",
}
}
-lm:default 'unittest'
+lm:default {
+ "bee-test",
+ "unit-test",
+ "install",
+}