diff options
| -rw-r--r-- | xmake/rules/c51/xmake.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/xmake/rules/c51/xmake.lua b/xmake/rules/c51/xmake.lua index c274b2333..c9f65af55 100644 --- a/xmake/rules/c51/xmake.lua +++ b/xmake/rules/c51/xmake.lua @@ -11,9 +11,13 @@ rule("c51.static") end end) - after_link(function(target) - import("lib.detect.find_tool") - local oh = assert(find_tool("oh51"), "oh51 not found") - os.iorunv(oh.program, {target:targetfile()}) - cprint("${color.warning} hex file generated %s", target:targetfile() .. ".hex") + after_link(function(target, opt) + import("core.project.depend") + depend.on_changed(function() + import("lib.detect.find_tool") + import("utils.progress") + local oh = assert(find_tool("oh51"), "oh51 not found") + os.iorunv(oh.program, {target:targetfile()}) + progress.show(opt.progress, "${color.build.target}generating.$(mode) %s", target:targetfile() .. ".hex") + end, {files = {target:targetfile()}}) end)
\ No newline at end of file |
