diff options
| author | ruki <[email protected]> | 2015-06-12 12:45:43 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-12 12:45:43 +0800 |
| commit | 1b9fc52acd62fea9dfa017481b146cf59993b1df (patch) | |
| tree | cd3d531fc73051415e32877eca2f49d0b7c3e9fb /xmake/scripts/tools/tools.lua | |
| parent | 99b9eb72c8db9854311fc0b5a79e07f8cae85242 (diff) | |
update platform for linux
Diffstat (limited to 'xmake/scripts/tools/tools.lua')
| -rw-r--r-- | xmake/scripts/tools/tools.lua | 13 |
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 |
