review3: add keil-c51 toolchain & rules
@@ -11,9 +11,13 @@ rule("c51.static")
end
end)
- after_link(function(target)
+ 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()})
- cprint("${color.warning} hex file generated %s", target:targetfile() .. ".hex")
+ progress.show(opt.progress, "${color.build.target}generating.$(mode) %s", target:targetfile() .. ".hex")
+ end, {files = {target:targetfile()}})
end)
\ No newline at end of file
