summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-09-01 00:45:55 +0800
committerruki <[email protected]>2023-09-01 00:45:55 +0800
commitbc32dfdb2c91fc05b368a111a89505569117ccff (patch)
treeb61390b4f5cac847fc31b0d8c895003ee0dd39ec
parentabc48d4f230d471ebf53051bf36f2a0ecd94077e (diff)
revert on_changed
-rw-r--r--xmake/actions/build/kinds/binary.lua2
-rw-r--r--xmake/actions/build/kinds/shared.lua2
-rw-r--r--xmake/actions/build/kinds/static.lua2
-rw-r--r--xmake/rules/c++/modules/modules_support/clang.lua8
-rw-r--r--xmake/rules/c++/modules/modules_support/gcc.lua8
-rw-r--r--xmake/rules/c++/modules/modules_support/msvc.lua8
-rw-r--r--xmake/rules/c++/unity_build/unity_build.lua2
-rw-r--r--xmake/rules/c51/xmake.lua2
-rw-r--r--xmake/rules/cuda/devlink/devlink.lua2
-rw-r--r--xmake/rules/platform/linux/driver/driver_modules.lua2
-rw-r--r--xmake/rules/protobuf/module_parser.lua2
-rw-r--r--xmake/rules/utils/merge_archive/xmake.lua2
-rw-r--r--xmake/rules/utils/symbols/export_all/export_all.lua2
-rw-r--r--xmake/rules/verilator/verilator.lua2
-rw-r--r--xmake/rules/xcode/application/build.lua2
-rw-r--r--xmake/rules/xcode/bundle/xmake.lua2
-rw-r--r--xmake/rules/xcode/framework/xmake.lua2
17 files changed, 26 insertions, 26 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua
index d9b5b26ba..f12ae736f 100644
--- a/xmake/actions/build/kinds/binary.lua
+++ b/xmake/actions/build/kinds/binary.lua
@@ -52,7 +52,7 @@ function _do_link_target(target, opt)
end
local dryrun = option.get("dry-run")
local depvalues = {linkinst:program(), linkflags}
- depend._on_changed(function ()
+ depend.on_changed(function ()
-- the target file
local targetfile = target:targetfile()
diff --git a/xmake/actions/build/kinds/shared.lua b/xmake/actions/build/kinds/shared.lua
index 5231641d2..5e6654767 100644
--- a/xmake/actions/build/kinds/shared.lua
+++ b/xmake/actions/build/kinds/shared.lua
@@ -52,7 +52,7 @@ function _do_link_target(target, opt)
end
local dryrun = option.get("dry-run")
local depvalues = {linkinst:program(), linkflags}
- depend._on_changed(function ()
+ depend.on_changed(function ()
-- the target file
local targetfile = target:targetfile()
diff --git a/xmake/actions/build/kinds/static.lua b/xmake/actions/build/kinds/static.lua
index 9a77dfa08..e075137b5 100644
--- a/xmake/actions/build/kinds/static.lua
+++ b/xmake/actions/build/kinds/static.lua
@@ -52,7 +52,7 @@ function _do_link_target(target, opt)
end
local dryrun = option.get("dry-run")
local depvalues = {linkinst:program(), linkflags}
- depend._on_changed(function ()
+ depend.on_changed(function ()
-- the target file
local targetfile = target:targetfile()
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua
index 02989928b..8cf54c883 100644
--- a/xmake/rules/c++/modules/modules_support/clang.lua
+++ b/xmake/rules/c++/modules/modules_support/clang.lua
@@ -332,7 +332,7 @@ function generate_dependencies(target, sourcebatch, opt)
local changed = false
for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
local dependfile = target:dependfile(sourcefile)
- depend._on_changed(function()
+ depend.on_changed(function()
if opt.progress then
progress.show(opt.progress, "${color.build.object}generating.module.deps %s", sourcefile)
end
@@ -433,7 +433,7 @@ function generate_stl_headerunits_for_batchjobs(target, batchjobs, headerunits,
local bmifile = path.join(stlcachedir, headerunit.name .. get_bmi_extension())
if not os.isfile(bmifile) then
batchjobs:addjob(headerunit.name, function (index, total)
- depend._on_changed(function()
+ depend.on_changed(function()
-- don't build same header unit at the same time
if not common.memcache():get2(headerunit.name, "building") then
common.memcache():set2(headerunit.name, "building", true)
@@ -505,7 +505,7 @@ function generate_user_headerunits_for_batchjobs(target, batchjobs, headerunits,
local bmifilename = path.basename(objectfile) .. get_bmi_extension()
local bmifile = path.join(outputdir, bmifilename)
batchjobs:addjob(headerunit.name, function (index, total)
- depend._on_changed(function()
+ depend.on_changed(function()
progress.show((index * 100) / total, "${color.build.object}compiling.headerunit.$(mode) %s", headerunit.name)
local objectdir = path.directory(objectfile)
if not os.isdir(objectdir) then
@@ -611,7 +611,7 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op
if fileconfig and fileconfig.install then
batchjobs:addjob(name .. "_metafile", function(index, total)
local metafilepath = common.get_metafile(target, cppfile)
- depend._on_changed(function()
+ depend.on_changed(function()
progress.show(opt.progress, "${color.build.object}generating.module.metadata %s", name)
local metadata = common.generate_meta_module_info(target, name, cppfile, module.requires)
json.savefile(metafilepath, metadata)
diff --git a/xmake/rules/c++/modules/modules_support/gcc.lua b/xmake/rules/c++/modules/modules_support/gcc.lua
index 784df5d7e..4fa92e4df 100644
--- a/xmake/rules/c++/modules/modules_support/gcc.lua
+++ b/xmake/rules/c++/modules/modules_support/gcc.lua
@@ -184,7 +184,7 @@ function generate_dependencies(target, sourcebatch, opt)
local changed = false
for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
local dependfile = target:dependfile(sourcefile)
- depend._on_changed(function()
+ depend.on_changed(function()
if opt.progress then
progress.show(opt.progress, "${color.build.object}generating.module.deps %s", sourcefile)
end
@@ -237,7 +237,7 @@ function generate_stl_headerunits_for_batchjobs(target, batchjobs, headerunits,
local bmifile = path.join(stlcachedir, headerunit.name .. get_bmi_extension())
if not os.isfile(bmifile) then
batchjobs:addjob(headerunit.name, function (index, total)
- depend._on_changed(function()
+ depend.on_changed(function()
progress.show((index * 100) / total, "${color.build.object}compiling.headerunit.$(mode) %s", headerunit.name)
local args = {"-c", "-x", "c++-system-header", headerunit.name}
local flags = table.join(compinst:compflags({target = target}), args)
@@ -305,7 +305,7 @@ function generate_user_headerunits_for_batchjobs(target, batchjobs, headerunits,
local bmifilename = path.basename(objectfile) .. get_bmi_extension()
local bmifile = path.join(outputdir, bmifilename)
batchjobs:addjob(headerunit.name, function (index, total)
- depend._on_changed(function()
+ depend.on_changed(function()
progress.show((index * 100) / total, "${color.build.object}compiling.headerunit.$(mode) %s", headerunit.name)
local objectdir = path.directory(objectfile)
if not os.isdir(objectdir) then
@@ -417,7 +417,7 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op
if fileconfig and fileconfig.install then
batchjobs:addjob(name .. "_metafile", function(index, total)
local metafilepath = common.get_metafile(target, cppfile)
- depend._on_changed(function()
+ depend.on_changed(function()
progress.show((index * 100) / total, "${color.build.object}generating.module.metadata %s", name)
local metadata = common.generate_meta_module_info(target, name, cppfile, module.requires)
json.savefile(metafilepath, metadata)
diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua
index 1cc881926..0643117d0 100644
--- a/xmake/rules/c++/modules/modules_support/msvc.lua
+++ b/xmake/rules/c++/modules/modules_support/msvc.lua
@@ -190,7 +190,7 @@ function generate_dependencies(target, sourcebatch, opt)
local changed = false
for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
local dependfile = target:dependfile(sourcefile)
- depend._on_changed(function ()
+ depend.on_changed(function ()
if opt.progress then
progress.show(opt.progress, "${color.build.object}generating.module.deps %s", sourcefile)
end
@@ -263,7 +263,7 @@ function generate_stl_headerunits_for_batchjobs(target, batchjobs, headerunits,
local bmifile = path.join(stlcachedir, headerunit.name .. get_bmi_extension())
local objectfile = bmifile .. ".obj"
batchjobs:addjob(headerunit.name, function(index, total)
- depend._on_changed(function()
+ depend.on_changed(function()
local flags = {
exportheaderflag,
headernameflag .. ":angle",
@@ -332,7 +332,7 @@ function generate_user_headerunits_for_batchjobs(target, batchjobs, headerunits,
local bmifilename = path.basename(objectfile) .. get_bmi_extension()
local bmifile = path.join(outputdir, bmifilename)
batchjobs:addjob(headerunit.name, function (index, total)
- depend._on_changed(function()
+ depend.on_changed(function()
local objectdir = path.directory(objectfile)
if not os.isdir(objectdir) then
os.mkdir(objectdir)
@@ -450,7 +450,7 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op
if fileconfig and fileconfig.install then
batchjobs:addjob(name .. "_metafile", function(index, total)
local metafilepath = common.get_metafile(target, cppfile)
- depend._on_changed(function()
+ depend.on_changed(function()
progress.show((index * 100) / total, "${color.build.object}generating.module.metadata %s", name)
local metadata = common.generate_meta_module_info(target, name, cppfile, module.requires)
json.savefile(metafilepath, metadata)
diff --git a/xmake/rules/c++/unity_build/unity_build.lua b/xmake/rules/c++/unity_build/unity_build.lua
index 84582c0c4..a6059fec0 100644
--- a/xmake/rules/c++/unity_build/unity_build.lua
+++ b/xmake/rules/c++/unity_build/unity_build.lua
@@ -23,7 +23,7 @@ import("core.project.depend")
function _merge_unityfile(target, sourcefile_unity, sourcefiles, opt)
local dependfile = target:dependfile(sourcefile_unity)
- depend._on_changed(function ()
+ depend.on_changed(function ()
-- trace
vprint("generating.unityfile %s", sourcefile_unity)
diff --git a/xmake/rules/c51/xmake.lua b/xmake/rules/c51/xmake.lua
index 0e4555753..bf6c7efde 100644
--- a/xmake/rules/c51/xmake.lua
+++ b/xmake/rules/c51/xmake.lua
@@ -35,7 +35,7 @@ rule("c51.binary")
import("core.project.depend")
import("lib.detect.find_tool")
import("utils.progress")
- depend._on_changed(function()
+ depend.on_changed(function()
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")
diff --git a/xmake/rules/cuda/devlink/devlink.lua b/xmake/rules/cuda/devlink/devlink.lua
index 3beb07f74..c849f28e5 100644
--- a/xmake/rules/cuda/devlink/devlink.lua
+++ b/xmake/rules/cuda/devlink/devlink.lua
@@ -88,7 +88,7 @@ function main(target, opt)
end
local dryrun = option.get("dry-run")
local depvalues = {linkinst:program(), linkflags}
- depend._on_changed(function ()
+ depend.on_changed(function ()
-- is verbose?
local verbose = option.get("verbose")
diff --git a/xmake/rules/platform/linux/driver/driver_modules.lua b/xmake/rules/platform/linux/driver/driver_modules.lua
index d3e1a7d98..845404504 100644
--- a/xmake/rules/platform/linux/driver/driver_modules.lua
+++ b/xmake/rules/platform/linux/driver/driver_modules.lua
@@ -236,7 +236,7 @@ function link(target, opt)
local targetfile = target:targetfile()
local dependfile = target:dependfile(targetfile)
local objectfiles = target:objectfiles()
- depend._on_changed(function ()
+ depend.on_changed(function ()
-- trace
progress.show(opt.progress, "${color.build.object}linking.$(mode) %s", targetfile)
diff --git a/xmake/rules/protobuf/module_parser.lua b/xmake/rules/protobuf/module_parser.lua
index d6d0486f7..80314c50a 100644
--- a/xmake/rules/protobuf/module_parser.lua
+++ b/xmake/rules/protobuf/module_parser.lua
@@ -36,7 +36,7 @@ end
-- generate module deps for the given file
function _generate_moduledeps(target, sourcefile, opt)
local dependfile = _get_dependfile_of_modulesource(target, sourcefile)
- depend._on_changed(function ()
+ depend.on_changed(function ()
-- trace
vprint("generating.proto.moduledeps %s", sourcefile)
diff --git a/xmake/rules/utils/merge_archive/xmake.lua b/xmake/rules/utils/merge_archive/xmake.lua
index f8def1084..272b2f641 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())
diff --git a/xmake/rules/utils/symbols/export_all/export_all.lua b/xmake/rules/utils/symbols/export_all/export_all.lua
index 18f3698db..14ea99211 100644
--- a/xmake/rules/utils/symbols/export_all/export_all.lua
+++ b/xmake/rules/utils/symbols/export_all/export_all.lua
@@ -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()))
diff --git a/xmake/rules/verilator/verilator.lua b/xmake/rules/verilator/verilator.lua
index d601358af..321191666 100644
--- a/xmake/rules/verilator/verilator.lua
+++ b/xmake/rules/verilator/verilator.lua
@@ -215,7 +215,7 @@ function build_cppfiles(target, batchjobs, sourcebatch, opt)
local cmakefile = path.join(autogendir, targetname .. ".cmake")
-- build verilog files
- depend._on_changed(function()
+ depend.on_changed(function()
local argv = {"--cc", "--make", "cmake", "--prefix", targetname, "--Mdir", autogendir}
local flags = target:values("verilator.flags")
if flags then
diff --git a/xmake/rules/xcode/application/build.lua b/xmake/rules/xcode/application/build.lua
index a3cbf062f..736de948c 100644
--- a/xmake/rules/xcode/application/build.lua
+++ b/xmake/rules/xcode/application/build.lua
@@ -35,7 +35,7 @@ function main (target, opt)
local frameworksdir = path.join(contentsdir, "Frameworks")
-- do build if changed
- depend._on_changed(function ()
+ depend.on_changed(function ()
-- trace progress info
progress.show(opt.progress, "${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir))
diff --git a/xmake/rules/xcode/bundle/xmake.lua b/xmake/rules/xcode/bundle/xmake.lua
index da78ec748..31c0a8296 100644
--- a/xmake/rules/xcode/bundle/xmake.lua
+++ b/xmake/rules/xcode/bundle/xmake.lua
@@ -77,7 +77,7 @@ rule("xcode.bundle")
local resourcesdir = path.absolute(target:data("xcode.bundle.resourcesdir"))
-- do build if changed
- depend._on_changed(function ()
+ depend.on_changed(function ()
-- trace progress info
progress.show(opt.progress, "${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir))
diff --git a/xmake/rules/xcode/framework/xmake.lua b/xmake/rules/xcode/framework/xmake.lua
index 81bd4ebc4..10b2f337f 100644
--- a/xmake/rules/xcode/framework/xmake.lua
+++ b/xmake/rules/xcode/framework/xmake.lua
@@ -94,7 +94,7 @@ rule("xcode.framework")
local headersdir = path.join(contentsdir, "Headers")
-- do build if changed
- depend._on_changed(function ()
+ depend.on_changed(function ()
-- trace progress info
progress.show(opt.progress, "${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir))