diff options
| author | ruki <[email protected]> | 2022-09-15 22:57:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-09-15 22:57:03 +0800 |
| commit | c01b847dfd8973165eec5651f3d650b89c0501c3 (patch) | |
| tree | 6b856e7cf0dc6eb002cb19491dbfae8ad6ef7ed8 | |
| parent | 4d8f6d073163a1b7221574dffa61265eab2337e1 (diff) | |
check on xxx
| -rw-r--r-- | xmake/actions/build/kinds/object.lua | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua index a81fa7489..e5f152054 100644 --- a/xmake/actions/build/kinds/object.lua +++ b/xmake/actions/build/kinds/object.lua @@ -142,16 +142,21 @@ end -- add batch jobs for group function _add_batchjobs_for_group(batchjobs, rootjob, target, group, suffix) + local did_on_targets = _g.did_on_targets + if not did_on_targets then + did_on_targets = {} + _g.did_on_targets = did_on_targets + end for _, item in pairs(group) do - local ignore_rule = false + local sourcebatch = item.sourcebatch if item.target then - if _add_batchjobs_for_target(batchjobs, rootjob, target, item.sourcebatch, suffix) and not suffix then - -- override on_xxx script in target? we need ignore rule scripts - ignore_rule = true + if _add_batchjobs_for_target(batchjobs, rootjob, target, sourcebatch, suffix) and not suffix then + did_on_targets[sourcebatch] = true end end - if item.rule and not ignore_rule then - _add_batchjobs_for_rule(batchjobs, rootjob, target, item.sourcebatch, suffix) + -- override on_xxx script in target? we need ignore rule scripts + if item.rule and (suffix or not did_on_targets[sourcebatch]) then + _add_batchjobs_for_rule(batchjobs, rootjob, target, sourcebatch, suffix) end end end |
