diff options
| author | ruki <[email protected]> | 2016-05-21 13:34:39 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-05-21 13:38:47 +0800 |
| commit | f45cc56c3351c4326458e60c643f570304e14bec (patch) | |
| tree | cdb3ac1c61985eb182c0a53070ec91dc6106a35c | |
| parent | 143bfb465af68ec29d4887d67a7f1f57b53c0747 (diff) | |
clean cached configure
| -rwxr-xr-x | xmake/actions/config/main.lua | 13 | ||||
| -rwxr-xr-x | xmake/actions/config/xmake.lua | 5 |
2 files changed, 15 insertions, 3 deletions
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua index cf4498f46..650370087 100755 --- a/xmake/actions/config/main.lua +++ b/xmake/actions/config/main.lua @@ -37,6 +37,11 @@ end -- need check function _need_check() + -- clean? + if option.get("clean") then + return true + end + -- the configure has been changed? reconfig it if config.changed() then return true @@ -107,7 +112,9 @@ function main() end -- override configure from the options or cache - options = options or cache.get("options_" .. targetname) + if not option.get("clean") then + options = options or cache.get("options_" .. targetname) + end for name, value in pairs(options) do config.set(name, value) end @@ -133,7 +140,9 @@ function main() end -- merge the cached configure - config.load(targetname) + if not option.get("clean") then + config.load(targetname) + end -- load platform platform.load(config.plat()) diff --git a/xmake/actions/config/xmake.lua b/xmake/actions/config/xmake.lua index fd3b5b584..98b0f213e 100755 --- a/xmake/actions/config/xmake.lua +++ b/xmake/actions/config/xmake.lua @@ -43,7 +43,10 @@ task("config") -- options , options = { - {'p', "plat", "kv", "$(host)", "Compile for the given platform." + {'c', "clean", "k", nil, "Clean the cached configure and configure all again." } + + , {} + , {'p', "plat", "kv", "$(host)", "Compile for the given platform." -- show the description of all platforms , function () |
