summaryrefslogtreecommitdiff
path: root/xmake/plugins/project/make/makefile.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-14 23:20:28 +0800
committerruki <[email protected]>2023-11-14 23:20:28 +0800
commitf070b5c9e770199d6fd5de9f696b4894238c6b58 (patch)
treeb74e1d129be1183e0bb484c874f07d2d4fe84ce2 /xmake/plugins/project/make/makefile.lua
parent661940b67e586377a362dd956b699244aa3165ec (diff)
add icon file
Diffstat (limited to 'xmake/plugins/project/make/makefile.lua')
-rw-r--r--xmake/plugins/project/make/makefile.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/xmake/plugins/project/make/makefile.lua b/xmake/plugins/project/make/makefile.lua
index 7d2559ea1..7d462b138 100644
--- a/xmake/plugins/project/make/makefile.lua
+++ b/xmake/plugins/project/make/makefile.lua
@@ -215,6 +215,15 @@ function _get_cmd_rm(filedir)
end
end
+-- get command: rmdir
+function _get_cmd_rmdir(filedir)
+ if is_subhost("windows") then
+ return string.format("@rmdir /S /Q %s > NUL 2>&1", filedir)
+ else
+ return string.format("@rm -rf %s", filedir)
+ end
+end
+
-- get command: echo
function _get_cmd_echo(str)
return string.format("@echo %s", colors.ignore(str))
@@ -248,6 +257,8 @@ function _get_command_string(cmd, outputdir)
end
elseif kind == "rm" then
return _get_cmd_rm(_get_relative_unix_path(cmd.filepath, outputdir))
+ elseif kind == "rmdir" then
+ return _get_cmd_rmdir(_get_relative_unix_path(cmd.dir, outputdir))
elseif kind == "mv" then
return _get_cmd_mv(_get_relative_unix_path(cmd.srcpath, outputdir), _get_relative_unix_path(cmd.dstpath, outputdir))
elseif kind == "ln" then