From 90693574d72357dd0b10bf962d36ebabe46221cb Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 15 Sep 2022 22:44:07 +0800 Subject: ignore rule --- xmake/actions/build/kinds/object.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua index 549d8aa96..b51f39300 100644 --- a/xmake/actions/build/kinds/object.lua +++ b/xmake/actions/build/kinds/object.lua @@ -124,10 +124,14 @@ end -- add batch jobs for group function _add_batchjobs_for_group(batchjobs, rootjob, target, group, suffix) for _, item in pairs(group) do + local ignore_rule = false if item.target then - _add_batchjobs_for_target(batchjobs, rootjob, target, item.sourcebatch, suffix) + 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 + end end - if item.rule then + if item.rule and not ignore_rule then _add_batchjobs_for_rule(batchjobs, rootjob, target, item.sourcebatch, suffix) end end -- cgit v1.3.1