diff options
| author | ruki <[email protected]> | 2023-09-01 00:45:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-09-01 00:45:44 +0800 |
| commit | abc48d4f230d471ebf53051bf36f2a0ecd94077e (patch) | |
| tree | 8027e583c9eb56d976b5b1abcf3bbd20bd8dc7b9 /xmake/rules/utils | |
| parent | 85f19d35241297cc92e41fe437f8ed27e5e8e3d2 (diff) | |
replace on_changed
Diffstat (limited to 'xmake/rules/utils')
| -rw-r--r-- | xmake/rules/utils/merge_archive/xmake.lua | 4 | ||||
| -rw-r--r-- | xmake/rules/utils/symbols/export_all/export_all.lua | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/xmake/rules/utils/merge_archive/xmake.lua b/xmake/rules/utils/merge_archive/xmake.lua index 39c913804..f8def1084 100644 --- a/xmake/rules/utils/merge_archive/xmake.lua +++ b/xmake/rules/utils/merge_archive/xmake.lua @@ -60,7 +60,7 @@ rule("utils.merge.archive") if #libraryfiles > 0 then table.insert(libraryfiles, target:targetfile()) end - depend.on_changed(function () + depend._on_changed(function () progress.show(opt.progress, "${color.build.target}merging.$(mode) %s", path.filename(target:targetfile())) if #libraryfiles > 0 then local tmpfile = os.tmpfile() .. path.extension(target:targetfile()) @@ -68,7 +68,7 @@ rule("utils.merge.archive") os.cp(tmpfile, target:targetfile()) os.rm(tmpfile) end - end, {dependfile = target:dependfile(target:targetfile() .. ".merge_archive"), files = libraryfiles}) + end, {dependfile = target:dependfile(target:targetfile() .. ".merge_archive"), files = libraryfiles, changed = target:is_rebuilt()}) end end) diff --git a/xmake/rules/utils/symbols/export_all/export_all.lua b/xmake/rules/utils/symbols/export_all/export_all.lua index a9d264e50..18f3698db 100644 --- a/xmake/rules/utils/symbols/export_all/export_all.lua +++ b/xmake/rules/utils/symbols/export_all/export_all.lua @@ -27,7 +27,7 @@ import("core.project.depend") import("utils.progress") -- export all symbols for dynamic library -function main (target, opt) +function main(target, opt) -- @note it only supports windows/dll now assert(target:is_shared(), 'rule("utils.symbols.export_all"): only for shared target(%s)!', target:name()) @@ -38,7 +38,7 @@ function main (target, opt) -- export all symbols local allsymbols_filepath = path.join(target:autogendir(), "rules", "symbols", "export_all.def") local dependfile = allsymbols_filepath .. ".d" - depend.on_changed(function () + depend._on_changed(function () -- trace progress info progress.show(opt.progress, "${color.build.target}exporting.$(mode) %s", path.filename(target:targetfile())) @@ -95,5 +95,5 @@ function main (target, opt) wprint('rule("utils.symbols.export_all"): no symbols are exported for target(%s)!', target:name()) end - end, {dependfile = dependfile, files = target:objectfiles()}) + end, {dependfile = dependfile, files = target:objectfiles(), changed = target:is_rebuilt()}) end |
