summaryrefslogtreecommitdiff
path: root/xmake/scripts/tools/tools.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-12 12:45:43 +0800
committerruki <[email protected]>2015-06-12 12:45:43 +0800
commit1b9fc52acd62fea9dfa017481b146cf59993b1df (patch)
treecd3d531fc73051415e32877eca2f49d0b7c3e9fb /xmake/scripts/tools/tools.lua
parent99b9eb72c8db9854311fc0b5a79e07f8cae85242 (diff)
update platform for linux
Diffstat (limited to 'xmake/scripts/tools/tools.lua')
-rw-r--r--xmake/scripts/tools/tools.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/xmake/scripts/tools/tools.lua b/xmake/scripts/tools/tools.lua
index 3dafcd749..862397704 100644
--- a/xmake/scripts/tools/tools.lua
+++ b/xmake/scripts/tools/tools.lua
@@ -171,8 +171,17 @@ function tools.load(name, root)
end
-- get the given tool from the current platform
-function tools.get(name)
- return tools.load(platform.tool(name))
+function tools.get(kind)
+
+ -- get the tool name
+ local toolname = platform.tool(kind)
+ if not toolname then
+ utils.error("cannot get tool name for %s", kind)
+ return
+ end
+
+ -- load it
+ return tools.load(toolname)
end
-- probe it's absolute path if exists from the given tool name