summaryrefslogtreecommitdiff
path: root/xmake/plugins/pack/batchcmds.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-07-12 22:51:24 +0800
committerruki <[email protected]>2024-07-15 12:21:42 +0800
commitaa6f60ff715cfa2e4b22345b54bd5ddc31ebef08 (patch)
tree003bb6d325df5f4373c0c727e5308fa1946d631f /xmake/plugins/pack/batchcmds.lua
parent98950182b26e2a52b3eb8d6aea318d26f04d7e79 (diff)
rename funcs
Diffstat (limited to 'xmake/plugins/pack/batchcmds.lua')
-rw-r--r--xmake/plugins/pack/batchcmds.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/xmake/plugins/pack/batchcmds.lua b/xmake/plugins/pack/batchcmds.lua
index 0c2b07b9a..552f978cd 100644
--- a/xmake/plugins/pack/batchcmds.lua
+++ b/xmake/plugins/pack/batchcmds.lua
@@ -60,7 +60,7 @@ function _get_target_installdir(package, target)
end
-- install headers
-function _install_headers(target, batchcmds_, opt)
+function _install_target_headers(target, batchcmds_, opt)
local package = opt.package
local srcheaders, dstheaders = target:headerfiles(_get_target_includedir(package, target), {installonly = true})
if srcheaders and dstheaders then
@@ -117,7 +117,7 @@ function _install_shared_for_packages(target, batchcmds_, outputdir)
end
-- uninstall headers
-function _uninstall_headers(target, batchcmds_, opt)
+function _uninstall_target_headers(target, batchcmds_, opt)
local package = opt.package
local _, dstheaders = target:headerfiles(_get_target_includedir(package, target), {installonly = true})
for _, dstheader in ipairs(dstheaders) do
@@ -211,7 +211,7 @@ function _on_target_installcmd_shared(target, batchcmds_, opt)
_install_shared_for_packages(target, batchcmds_, bindir)
-- install headers
- _install_headers(target, batchcmds_, opt)
+ _install_target_headers(target, batchcmds_, opt)
end
-- on install static target command
@@ -226,12 +226,12 @@ function _on_target_installcmd_static(target, batchcmds_, opt)
end
-- install headers
- _install_headers(target, batchcmds_, opt)
+ _install_target_headers(target, batchcmds_, opt)
end
-- on install headeronly target command
function _on_target_installcmd_headeronly(target, batchcmds_, opt)
- _install_headers(target, batchcmds_, opt)
+ _install_target_headers(target, batchcmds_, opt)
end
-- on install source target command
@@ -317,7 +317,7 @@ function _on_target_uninstallcmd_shared(target, batchcmds_, opt)
batchcmds_:rm(path.join(libdir, path.basename(targetfile) .. (target:is_plat("mingw") and ".dll.a" or ".lib")), {emptydirs = true})
-- remove headers from the include directory
- _uninstall_headers(target, batchcmds_, opt)
+ _uninstall_target_headers(target, batchcmds_, opt)
-- uninstall shared libraries for packages
_uninstall_shared_for_packages(target, batchcmds_, bindir)
@@ -333,12 +333,12 @@ function _on_target_uninstallcmd_static(target, batchcmds_, opt)
batchcmds_:rm(path.join(libdir, path.filename(target:symbolfile())), {emptydirs = true})
-- remove headers from the include directory
- _uninstall_headers(target, batchcmds_, opt)
+ _uninstall_target_headers(target, batchcmds_, opt)
end
-- on uninstall headeronly target command
function _on_target_uninstallcmd_headeronly(target, batchcmds_, opt)
- _uninstall_headers(target, batchcmds_, opt)
+ _uninstall_target_headers(target, batchcmds_, opt)
end
-- on uninstall source target command