diff options
| author | ruki <[email protected]> | 2015-06-12 10:45:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-12 10:45:14 +0800 |
| commit | 1678ef146c122b8a38a4485262f43b816230aa0f (patch) | |
| tree | ad6ff2cef9e9f50726f04dc1cafe135aaa26a26d /xmake/scripts/tools/tools.lua | |
| parent | c2e614548b92821c8396e2a2e9f06afeb97cc7bd (diff) | |
probe and compile for android
Diffstat (limited to 'xmake/scripts/tools/tools.lua')
| -rw-r--r-- | xmake/scripts/tools/tools.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xmake/scripts/tools/tools.lua b/xmake/scripts/tools/tools.lua index 9add7310c..3dafcd749 100644 --- a/xmake/scripts/tools/tools.lua +++ b/xmake/scripts/tools/tools.lua @@ -147,7 +147,7 @@ function tools.load(name, root) end -- load script - local script = loadfile(toolpath) + local script, errors = loadfile(toolpath) if script then -- load tool @@ -163,6 +163,10 @@ function tools.load(name, root) -- ok? return tool + else + utils.error(errors) + utils.error("load %s failed!", toolpath) + assert(false) end end @@ -184,13 +188,13 @@ function tools.probe(name, dirs) -- attempt to get it from the given directories if dirs then - for _, dir in ipairs(dirs) do + for _, dir in ipairs(utils.wrap(dirs)) do -- probe it local toolpath = tools._probe(dir, name) -- ok? - if toolpath then + if toolpath and os.execute(string.format("%s > %s 2>&1", toolpath, xmake._NULDEV)) ~= 0x7f00 then return toolpath end end |
