From f070b5c9e770199d6fd5de9f696b4894238c6b58 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 14 Nov 2023 23:20:28 +0800 Subject: add icon file --- xmake/plugins/project/make/makefile.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'xmake/plugins/project/make/makefile.lua') 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 -- cgit v1.3.1