diff options
| author | ruki <[email protected]> | 2023-11-15 16:34:08 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-15 16:34:08 +0800 |
| commit | 6677fd77ee78b53a1f9bd4ce9665ce8b60083d47 (patch) | |
| tree | 0094dfb752ac8e8816973f0db25b328c844d550f /xmake/plugins/project/make/makefile.lua | |
| parent | 4b102cbd2221494395e6e279ed453eee81ba45a4 (diff) | |
| parent | 7c37e9b9b92b53e4384daea5193f826bf8ac9492 (diff) | |
Merge pull request #4373 from xmake-io/xpack
Support `xmake pack`
Diffstat (limited to 'xmake/plugins/project/make/makefile.lua')
| -rw-r--r-- | xmake/plugins/project/make/makefile.lua | 11 |
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 |
