From 99bcdf969aa6ad79034f4689a5cf715a960658ca Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 18 Jul 2026 00:34:25 +0800 Subject: add transform lua file support --- xmake/modules/private/utils/batchcmds.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'xmake/modules/private/utils/batchcmds.lua') diff --git a/xmake/modules/private/utils/batchcmds.lua b/xmake/modules/private/utils/batchcmds.lua index 2c80574a5..349e31efe 100644 --- a/xmake/modules/private/utils/batchcmds.lua +++ b/xmake/modules/private/utils/batchcmds.lua @@ -328,8 +328,14 @@ end -- add command: call lua function function batchcmds:call(func, argv, opt) - sandbox.fork(func) - table.insert(self:cmds(), {kind = "call", func = func, argv = argv, opt = opt}) + local functype = type(func) + if functype == "string" then + self:lua(func, argv, opt) + else + assert(functype == "function") + sandbox.fork(func) + table.insert(self:cmds(), {kind = "call", func = func, argv = argv, opt = opt}) + end end -- add command: compile source files -- cgit v1.3.1