summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--make.lua4
-rw-r--r--make/install.lua11
-rw-r--r--make/unittest.lua3
3 files changed, 8 insertions, 10 deletions
diff --git a/make.lua b/make.lua
index 6fd709f7..5af7f141 100644
--- a/make.lua
+++ b/make.lua
@@ -21,7 +21,7 @@ lm:lua_dll 'lpeglabel' {
}
lm:build 'install' {
- '$luamake', 'lua', 'make/install.lua', lm.plat,
+ '$luamake', 'lua', 'make/install.lua', lm.builddir,
deps = {
'lua',
'lpeglabel',
@@ -31,7 +31,7 @@ lm:build 'install' {
}
lm:build 'unittest' {
- '$luamake', 'lua', 'make/unittest.lua', lm.plat,
+ '$luamake', 'lua', 'make/unittest.lua',
deps = {
'install',
'test',
diff --git a/make/install.lua b/make/install.lua
index 75556ac1..036f0f4b 100644
--- a/make/install.lua
+++ b/make/install.lua
@@ -1,20 +1,19 @@
-local platform = ...
+local builddir = ...
local fs = require 'bee.filesystem'
-local sp = require 'bee.subprocess'
local pf = require 'bee.platform'
local CWD = fs.current_path()
local output = CWD / 'bin' / pf.OS
-local bindir = CWD / 'build' / platform / 'bin'
-local exe = platform == 'msvc' and ".exe" or ""
-local dll = platform == 'msvc' and ".dll" or ".so"
+local bindir = CWD / builddir / 'bin'
+local exe = pf.OS == 'Windows' and ".exe" or ""
+local dll = pf.OS == 'Windows' and ".dll" or ".so"
fs.create_directories(output)
fs.copy_file(bindir / 'lpeglabel'..dll, output / 'lpeglabel'..dll, true)
fs.copy_file(bindir / 'bee'..dll, output / 'bee'..dll, true)
fs.copy_file(bindir / 'lua'..exe, output / 'lua-language-server'..exe, true)
-if platform == 'msvc' then
+if pf.OS == 'Windows' then
fs.copy_file(bindir / 'lua54'..dll, output / 'lua54'..dll, true)
require 'msvc'.copy_vcrt('x64', output)
end
diff --git a/make/unittest.lua b/make/unittest.lua
index 25839c96..1c2c2d6f 100644
--- a/make/unittest.lua
+++ b/make/unittest.lua
@@ -1,8 +1,7 @@
-local platform = ...
local fs = require 'bee.filesystem'
local sp = require 'bee.subprocess'
local pf = require 'bee.platform'
-local exe = platform == 'msvc' and ".exe" or ""
+local exe = pf.OS == 'Windows' and ".exe" or ""
local CWD = fs.current_path()
local process = assert(sp.spawn {