diff options
| author | ruki <[email protected]> | 2015-06-05 11:20:58 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-05 11:20:58 +0800 |
| commit | 4fd209354ecf8a6f90b5a19a18e2268e3c9d649f (patch) | |
| tree | d2a8ee6f98686abfc14259ca6dee7ab736551c9f /xmake/scripts/action | |
| parent | 12ce7dea3c7a74f77e9792236cb85bab4fd001e4 (diff) | |
fix some bug for config
Diffstat (limited to 'xmake/scripts/action')
| -rw-r--r-- | xmake/scripts/action/_build.lua | 10 | ||||
| -rw-r--r-- | xmake/scripts/action/_clean.lua | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/xmake/scripts/action/_build.lua b/xmake/scripts/action/_build.lua index 288485fc1..cf5c1ea93 100644 --- a/xmake/scripts/action/_build.lua +++ b/xmake/scripts/action/_build.lua @@ -33,14 +33,18 @@ local makefile = require("base/makefile") -- done the given config function _build.done() + -- the options + local options = xmake._OPTIONS + assert(options) + -- the target name - local target_name = config.get("target") + local target_name = options.target -- rebuild it? - if config.get("rebuild") or config.get("__rebuild") then + if options.rebuild or config.get("__rebuild") then clean.remove(target_name) -- update it? - elseif config.get("update") then + elseif options.update then clean.remove(target_name, true) end diff --git a/xmake/scripts/action/_clean.lua b/xmake/scripts/action/_clean.lua index 8f026c057..5af3604b7 100644 --- a/xmake/scripts/action/_clean.lua +++ b/xmake/scripts/action/_clean.lua @@ -30,8 +30,12 @@ local config = require("base/config") -- done the given config function _clean.done() + -- the options + local options = xmake._OPTIONS + assert(options) + -- clean the current target - if not clean.remove(config.get("target")) then + if not clean.remove(options.target) then return false end |
