summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2016-01-18 11:51:38 +0800
committerruki <[email protected]>2016-01-18 11:51:38 +0800
commit972d3462cf7022424deff6e768ae614ba8d3a394 (patch)
tree07889624a42c57427199cf2c22f89838ecbd47b7
parent7b9d2032de11bbfb6e1b219e0b15f643d29ffa05 (diff)
remove objs for static librarys
-rw-r--r--xmake/core/base/clean.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/xmake/core/base/clean.lua b/xmake/core/base/clean.lua
index 9fbb3258a..e364ffc57 100644
--- a/xmake/core/base/clean.lua
+++ b/xmake/core/base/clean.lua
@@ -49,6 +49,21 @@ function clean._remove(filedirs)
utils.error(errors)
return false
end
+ -- remove "*.o/obj" files?
+ elseif filedir:find("%*") then
+ -- match all files
+ local files = os.match(filedir)
+ if files then
+ for _, file in ipairs(files) do
+ -- remove it
+ local ok, errors = os.rm(file)
+ if not ok then
+ -- error
+ utils.error(errors)
+ return false
+ end
+ end
+ end
end
end