summaryrefslogtreecommitdiff
path: root/xmake/scripts/action/_build.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-04 22:28:15 +0800
committerruki <[email protected]>2015-06-04 22:28:24 +0800
commit44fd11396d7b073e6b5227894c5db02b3585302f (patch)
treed755e4b6bd6c910559a3cb72dd32cd5d0d0e3f7c /xmake/scripts/action/_build.lua
parentf0f9b217ddb81084a411d09a4a23292716b20c46 (diff)
impl auto rebuild and fix some bug
Diffstat (limited to 'xmake/scripts/action/_build.lua')
-rw-r--r--xmake/scripts/action/_build.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/xmake/scripts/action/_build.lua b/xmake/scripts/action/_build.lua
index d07005eab..288485fc1 100644
--- a/xmake/scripts/action/_build.lua
+++ b/xmake/scripts/action/_build.lua
@@ -37,7 +37,7 @@ function _build.done()
local target_name = config.get("target")
-- rebuild it?
- if config.get("rebuild") then
+ if config.get("rebuild") or config.get("__rebuild") then
clean.remove(target_name)
-- update it?
elseif config.get("update") then
@@ -53,6 +53,19 @@ function _build.done()
return false
end
+ -- clear rebuild mark and save configure to file
+ if config.get("__rebuild") then
+
+ -- clear it
+ config.set("__rebuild", nil)
+
+ -- save the configure
+ if not config.savexconf() then
+ -- error
+ utils.error("update configure failed!")
+ end
+ end
+
-- ok
print("build ok!")
return true