summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-03-12 22:33:00 +0800
committerruki <[email protected]>2020-03-12 09:18:02 +0800
commitf27cd93d0225ec89370cc5dd1c0051b36518618e (patch)
tree0eaeddad11622d477fb271a2e21abf740e55f0c2
parent75164e870c8348960856bf6a42ac897c292b6dcd (diff)
update job name for object
-rw-r--r--xmake/actions/build/kinds/object.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua
index 9c3816611..9f19f47b5 100644
--- a/xmake/actions/build/kinds/object.lua
+++ b/xmake/actions/build/kinds/object.lua
@@ -48,9 +48,8 @@ function _add_batchjobs_for_rule(batchjobs, rootjob, target, sourcebatch, suffix
script = ruleinst:script(scriptname)
if script then
local sourcekind = sourcebatch.sourcekind
- local jobname = "rule/" .. rulename .. "/" .. scriptname .. "/"
- for idx, sourcefile in ipairs(sourcebatch.sourcefiles) do
- batchjobs:addjob(jobname .. idx, function (index, total)
+ for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
+ batchjobs:addjob(sourcefile, function (index, total)
script(target, sourcefile, {sourcekind = sourcekind, progress = (index * 100) / total})
end, rootjob)
end
@@ -78,9 +77,8 @@ function _add_batchjobs_for_target(batchjobs, rootjob, target, sourcebatch, suff
script = target:script(scriptname)
if script then
local sourcekind = sourcebatch.sourcekind
- local jobname = target:name() .. "/" .. scriptname .. "/"
- for idx, sourcefile in ipairs(sourcebatch.sourcefiles) do
- batchjobs:addjob(jobname .. idx, function (index, total)
+ for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
+ batchjobs:addjob(sourcefile, function (index, total)
script(target, sourcefile, {sourcekind = sourcekind, progress = (index * 100) / total})
end, rootjob)
end