diff options
| author | ruki <[email protected]> | 2015-12-05 00:33:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-12-05 00:33:03 +0800 |
| commit | 98a12249aff0eed41c11f31da54205dc876379bf (patch) | |
| tree | 65afbecb1ae45a65f1ac27cd74bd071a17b1577f /xmake/scripts/base/makefile.lua | |
| parent | 95cc4b92a1b940058c2cc8f2bdf0e05ae222a33e (diff) | |
add dispatcher
Diffstat (limited to 'xmake/scripts/base/makefile.lua')
| -rw-r--r-- | xmake/scripts/base/makefile.lua | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/xmake/scripts/base/makefile.lua b/xmake/scripts/base/makefile.lua index 934772fe5..ec5557c23 100644 --- a/xmake/scripts/base/makefile.lua +++ b/xmake/scripts/base/makefile.lua @@ -97,15 +97,22 @@ function makefile._make_object_for_static(file, target, srcfile, objfile) elseif mode == "profile" then mode = ".p" else mode = "" end - -- get extractor name + -- get the extractor tool name local toolname = platform.tool("ex") if not toolname then - utils.error("cannot get extractor!") + utils.error("cannot get extractor name!") + return false + end + + -- find the tool file path + local toolpath = tools.find(toolname) + if not toolpath or not os.isfile(toolpath) then + utils.error("cannot get extractor path!") return false end -- make command - local cmd = string.format("xmake l extract \"%s\" %s %s > %s 2>&1", toolname, srcfile, objfile, makefile._LOGFILE) + local cmd = string.format("xmake l dispatcher \"%s\" \"%s\" extract %s %s > %s 2>&1", toolname, toolpath, srcfile, objfile, makefile._LOGFILE) -- make head file:write(string.format("%s:", objfile)) @@ -229,7 +236,10 @@ function makefile._make_target(file, name, target) -- get the linker from the given kind local l = linker.get(target.kind) - if not l then return false end + if not l then + utils.error("cannot get linker with kind: %s", target.kind) + return false + end -- make head file:write(string.format("%s: %s\n", name, targetfile)) |
