summaryrefslogtreecommitdiff
path: root/xmake/modules/core
diff options
context:
space:
mode:
authorruki <[email protected]>2023-09-01 00:42:33 +0800
committerruki <[email protected]>2023-09-01 00:42:33 +0800
commit85f19d35241297cc92e41fe437f8ed27e5e8e3d2 (patch)
tree110f1e2fcc950507998b5911e12df190a2d42658 /xmake/modules/core
parent6dc3f73929a7dde224d77bbcd5db54be22958cda (diff)
rename always_changed to dryrun
Diffstat (limited to 'xmake/modules/core')
-rw-r--r--xmake/modules/core/project/depend.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/xmake/modules/core/project/depend.lua b/xmake/modules/core/project/depend.lua
index 9f386c8f1..c66830521 100644
--- a/xmake/modules/core/project/depend.lua
+++ b/xmake/modules/core/project/depend.lua
@@ -157,16 +157,15 @@ end
--
-- end, {dependfile = "/xx/xx",
-- values = {compinst:program(), compflags},
--- files = {sourcefile, ...},
--- always_changed = false})
+-- files = {sourcefile, ...}})
--
function on_changed(callback, opt)
-- init option
opt = opt or {}
- -- always changed? we only do callback directly
- if opt.always_changed then
+ -- dry run? we only do callback directly and do not change any status
+ if opt.dryrun then
return callback()
end
@@ -180,9 +179,8 @@ function on_changed(callback, opt)
end
-- load dependent info
- local dependinfo = option.get("rebuild") and {} or (load(dependfile) or {})
+ local dependinfo = opt.changed and {} or (load(dependfile) or {})
- -- need build this object?
-- @note we use mtime(dependfile) instead of mtime(objectfile) to ensure the object file is is fully compiled.
-- @see https://github.com/xmake-io/xmake/issues/748
if not is_changed(dependinfo, {lastmtime = opt.lastmtime or os.mtime(dependfile), values = opt.values, files = opt.files}) then