summaryrefslogtreecommitdiff
path: root/xmake/platforms/linux
diff options
context:
space:
mode:
authorruki <[email protected]>2017-01-05 12:15:59 +0800
committerruki <[email protected]>2017-01-06 17:20:08 +0800
commit2e58f26793dc910c024eeba4adb6d52df26e0e22 (patch)
tree61703e4e89fc3609a1774871645d5032a74eae6f /xmake/platforms/linux
parent7d17523c795681265900d109c0ee26d2349eaf73 (diff)
move checker to on_check
Diffstat (limited to 'xmake/platforms/linux')
-rw-r--r--xmake/platforms/linux/check.lua (renamed from xmake/platforms/linux/checker.lua)15
-rwxr-xr-xxmake/platforms/linux/xmake.lua6
2 files changed, 8 insertions, 13 deletions
diff --git a/xmake/platforms/linux/checker.lua b/xmake/platforms/linux/check.lua
index b295db26a..5912dc348 100644
--- a/xmake/platforms/linux/checker.lua
+++ b/xmake/platforms/linux/check.lua
@@ -17,7 +17,7 @@
-- Copyright (C) 2015 - 2016, ruki All rights reserved.
--
-- @author ruki
--- @file checker.lua
+-- @file check.lua
--
-- imports
@@ -113,8 +113,8 @@ function _check_toolchains(config)
checker.check_toolchain(config, "dd", cross, "lldb", "the debugger")
end
--- init it
-function init()
+-- check it
+function main(kind)
-- init the check list of config
_g.config =
@@ -131,12 +131,7 @@ function init()
, _check_ndk_sdkver
}
-end
-
--- get the property
-function get(name)
-
- -- get it
- return _g[name]
+ -- check it
+ checker.check(kind, _g)
end
diff --git a/xmake/platforms/linux/xmake.lua b/xmake/platforms/linux/xmake.lua
index 9a64b8918..bfefad521 100755
--- a/xmake/platforms/linux/xmake.lua
+++ b/xmake/platforms/linux/xmake.lua
@@ -32,9 +32,6 @@ platform("linux")
-- set archs
set_archs("i386", "x86_64")
- -- set checker
- set_checker("checker")
-
-- set tooldirs
set_tooldirs("/usr/bin", "/usr/local/bin", "/opt/bin", "/opt/local/bin")
@@ -44,6 +41,9 @@ platform("linux")
-- on uninstall
on_uninstall("uninstall")
+ -- on check
+ on_check("check")
+
-- on load
on_load(function ()