summaryrefslogtreecommitdiff
path: root/xmake/actions
diff options
context:
space:
mode:
authorruki <[email protected]>2026-06-18 00:55:44 +0800
committerruki <[email protected]>2026-06-18 00:55:44 +0800
commit80f6dba52aa17a4900a51f76da7f05cf3d5fa73c (patch)
tree5295163cd06e8790e4a26ac3f542dbbc9b326977 /xmake/actions
parentb59597d77a411a53ef74d9e384a25dbd9e82a634 (diff)
check multiple targets
Diffstat (limited to 'xmake/actions')
-rw-r--r--xmake/actions/build/main.lua6
-rw-r--r--xmake/actions/clean/main.lua7
2 files changed, 4 insertions, 9 deletions
diff --git a/xmake/actions/build/main.lua b/xmake/actions/build/main.lua
index 9b0fcc1e2..2bc298cd1 100644
--- a/xmake/actions/build/main.lua
+++ b/xmake/actions/build/main.lua
@@ -38,7 +38,7 @@ import("private.cache.build_cache")
import("private.service.remote_build.action", {alias = "remote_build_action"})
import("private.utils.statistics")
import("private.action.utils", {alias = "action_utils"})
-import("private.detect.check_targetname")
+import("private.detect.check_targetnames")
-- try building it
function _do_try_build(configfile, tool, trybuild, trybuild_detected, targetnames)
@@ -201,9 +201,7 @@ function main(opt)
-- check target names
if targetnames then
- for _, targetname in ipairs(targetnames) do
- assert(check_targetname(targetname))
- end
+ assert(check_targetnames(targetnames))
end
-- enter project directory
diff --git a/xmake/actions/clean/main.lua b/xmake/actions/clean/main.lua
index a85fca742..ba30ccb77 100644
--- a/xmake/actions/clean/main.lua
+++ b/xmake/actions/clean/main.lua
@@ -29,7 +29,7 @@ import("core.platform.platform")
import("private.action.clean.remove_files")
import("target.action.clean", {alias = "_do_clean_target"})
import("private.service.remote_build.action", {alias = "remote_build_action"})
-import("private.detect.check_targetname")
+import("private.detect.check_targetnames")
import("private.action.utils", {alias = "action_utils"})
-- on clean target
@@ -107,10 +107,7 @@ end
-- clean targets
function _clean(targetnames)
if targetnames and #targetnames > 0 then
- for _, targetname in ipairs(targetnames) do
- local target = assert(check_targetname(targetname))
- _clean_target(target)
- end
+ _clean_targets(assert(check_targetnames(targetnames)))
else
_clean_targets(project.ordertargets())
end