summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-07-19 22:37:49 +0800
committerruki <[email protected]>2024-07-19 22:37:49 +0800
commit5169dfdf8677bad2aaf1b74b73176578f8b390af (patch)
tree6e6bb7e5a9ec9fb736d5b37b94c7276162174545
parent6a405fa54114a513213c4000de3ca88dd1a4f337 (diff)
fix clean all
-rw-r--r--xmake/actions/clean/main.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/actions/clean/main.lua b/xmake/actions/clean/main.lua
index 6470208d5..4d149584e 100644
--- a/xmake/actions/clean/main.lua
+++ b/xmake/actions/clean/main.lua
@@ -104,16 +104,16 @@ end
-- clean target
function _clean(targetname)
-
- -- clean the given target
if targetname then
local target = project.target(targetname)
_clean_target(target)
else
_clean_targets(project.ordertargets())
end
+end
- -- remove the configure directory if remove all
+-- clean configuration cache
+function _clean_configs()
if option.get("all") then
remove_files(config.directory())
end
@@ -142,7 +142,6 @@ function _try_clean()
end
end
--- main
function main()
-- try cleaning it using third-party buildsystem if xmake.lua not exists
@@ -176,6 +175,9 @@ function main()
-- unlock the whole project
project.unlock()
+ -- we must call it after unlocking project because it will remove project lockfile
+ _clean_configs()
+
-- leave project directory
os.cd(oldir)
end