diff options
| author | ruki <[email protected]> | 2021-10-28 15:54:49 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-28 15:54:49 +0800 |
| commit | 0fcbd78cc212f820aa8c33d9cfb73f3e6018af42 (patch) | |
| tree | 9a131dd2f1db79a8f1cd94125563c71507de874a /xmake/plugins/project/make/makefile.lua | |
| parent | 0b3057dce66dc41957de6c588d1fd2664c8de298 (diff) | |
| parent | d48ea6ae405def382ece2aa58cad9ab96d6fcd80 (diff) | |
Merge pull request #1780 from xmake-io/cmake
Add custom commands for cmake
Diffstat (limited to 'xmake/plugins/project/make/makefile.lua')
| -rw-r--r-- | xmake/plugins/project/make/makefile.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/plugins/project/make/makefile.lua b/xmake/plugins/project/make/makefile.lua index 6b94cf992..f9f0581c0 100644 --- a/xmake/plugins/project/make/makefile.lua +++ b/xmake/plugins/project/make/makefile.lua @@ -33,7 +33,7 @@ end -- mkdir directory function _mkdir(makefile, dir) - if is_plat("windows") then + if is_subhost("windows") then makefile:print("\t-@mkdir %s > NUL 2>&1", dir) else makefile:print("\t@mkdir -p %s", dir) @@ -42,7 +42,7 @@ end -- copy file function _cp(makefile, sourcefile, targetfile) - if is_plat("windows") then + if is_subhost("windows") then makefile:print("\t@copy /Y %s %s > NUL 2>&1", sourcefile, targetfile) else makefile:print("\t@cp %s %s", sourcefile, targetfile) @@ -51,7 +51,7 @@ end -- try to remove the given file or directory function _tryrm(makefile, filedir) - if is_plat("windows") then + if is_subhost("windows") then -- we attempt to delete it as file first, we remove it as directory if failed makefile:print("\t@del /F /Q %s > NUL 2>&1 || rmdir /S /Q %s > NUL 2>&1", filedir, filedir) else |
