diff options
| author | ruki <[email protected]> | 2026-07-18 00:27:46 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-07-18 00:27:46 +0800 |
| commit | 063bae8898d09f1f999a6fb2ad7a139777ebb7d7 (patch) | |
| tree | c8752db7e8c79e109b4e67b3e18b1770d9ee8e9d | |
| parent | 77aa979dc7fc9169ed0cc8d71511c785288b47ef (diff) | |
add batchcmds:call warnings
| -rw-r--r-- | xmake/plugins/project/utils/target_cmds.lua | 3 | ||||
| -rw-r--r-- | xmake/rules/utils/bin2c/utils.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/utils/bin2obj/utils.lua | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/xmake/plugins/project/utils/target_cmds.lua b/xmake/plugins/project/utils/target_cmds.lua index 7ea3a13a0..1c5fed7c8 100644 --- a/xmake/plugins/project/utils/target_cmds.lua +++ b/xmake/plugins/project/utils/target_cmds.lua @@ -87,6 +87,9 @@ function get_target_buildcmds(target, opt) cmd.program = os.programfile() cmd.argv = table.join("lua", cmd.script, cmd.argv) cmd.script = nil + elseif cmd.func and kind == "call" then + local name = cmd.opt and cmd.opt.name or "unknown" + wprint("%s: batchcmds:call() is not supported by the project generator and will be ignored!", name) end end return buildcmds:cmds() diff --git a/xmake/rules/utils/bin2c/utils.lua b/xmake/rules/utils/bin2c/utils.lua index 9765fb2f0..156752576 100644 --- a/xmake/rules/utils/bin2c/utils.lua +++ b/xmake/rules/utils/bin2c/utils.lua @@ -59,7 +59,7 @@ function generate_headerfile(target, batchcmds, binaryfile, opt) if transform then batchcmds:show_progress(progress, "${color.build.object}transforming.bin2c %s", binaryfile) local transformed_file = target:autogenfile(binaryfile) - batchcmds:call(transform, {binaryfile, transformed_file}, {target = target}) + batchcmds:call(transform, {binaryfile, transformed_file}, {name = "bin2c/transform", target = target}) binaryfile = transformed_file end diff --git a/xmake/rules/utils/bin2obj/utils.lua b/xmake/rules/utils/bin2obj/utils.lua index 7b98660d3..bcee334f0 100644 --- a/xmake/rules/utils/bin2obj/utils.lua +++ b/xmake/rules/utils/bin2obj/utils.lua @@ -60,7 +60,7 @@ function generate_objectfile(target, batchcmds, binaryfile, opt) if transform then batchcmds:show_progress(progress, "${color.build.object}transforming.bin2obj %s", binaryfile) local transformed_file = target:autogenfile(binaryfile) - batchcmds:call(transform, {binaryfile, transformed_file}, {target = target}) + batchcmds:call(transform, {binaryfile, transformed_file}, {name = "bin2obj/transform", target = target}) binaryfile = transformed_file end |
