From 1b9fc52acd62fea9dfa017481b146cf59993b1df Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 12 Jun 2015 12:45:43 +0800 Subject: update platform for linux --- xmake/scripts/tools/tools.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'xmake/scripts/tools/tools.lua') 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 -- cgit v1.3.1