summaryrefslogtreecommitdiff
path: root/xmake/modules/target
diff options
context:
space:
mode:
authorruki <[email protected]>2022-10-06 00:56:30 +0800
committerruki <[email protected]>2022-10-06 00:56:30 +0800
commit6013fcd66f60078ed7fec6557fe2a61a3873a0ea (patch)
tree1c9e2ced115ce9a7dbb78464751b9d72b7bef6ff /xmake/modules/target
parent9fcad1a90c2c750e2a2fa8c55962eb0f9495df8b (diff)
remove emptydirs after uninstalling #2901
Diffstat (limited to 'xmake/modules/target')
-rw-r--r--xmake/modules/target/action/uninstall/unix.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/modules/target/action/uninstall/unix.lua b/xmake/modules/target/action/uninstall/unix.lua
index 7deeb53ef..1ad1d78ae 100644
--- a/xmake/modules/target/action/uninstall/unix.lua
+++ b/xmake/modules/target/action/uninstall/unix.lua
@@ -18,12 +18,15 @@
-- @file unix.lua
--
+-- imports
+import("private.action.clean.remove_files")
+
-- uninstall headers
function _uninstall_headers(target, opt)
local includedir = path.join(target:installdir(), opt and opt.includedir or "include")
local _, dstheaders = target:headerfiles(includedir, {installonly = true})
for _, dstheader in ipairs(dstheaders) do
- os.vrm(dstheader)
+ remove_files(dstheader, {emptydir = true})
end
end
@@ -44,7 +47,7 @@ function _uninstall_shared_for_package(target, pkg, outputdir)
end
end
end
- os.vrm(filepath)
+ remove_files(filepath, {emptydir = true})
end
end
end