diff options
| author | ruki <[email protected]> | 2016-05-05 22:58:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-05-05 22:58:09 +0800 |
| commit | e89130661686f0f3faf4ac87c989865b5fcc4823 (patch) | |
| tree | 3996be74c90571570fb4fdaf00ddb9b28d46da72 | |
| parent | 901771bcb402b51b27684d4e793ce3ca98df4a29 (diff) | |
fix config bug
| -rwxr-xr-x | xmake/actions/build/main.lua | 15 | ||||
| -rw-r--r-- | xmake/core/base/option.lua | 4 | ||||
| -rw-r--r-- | xmake/core/tool/compiler.lua | 2 | ||||
| -rw-r--r-- | xmake/core/tool/linker.lua | 2 |
4 files changed, 17 insertions, 6 deletions
diff --git a/xmake/actions/build/main.lua b/xmake/actions/build/main.lua index 22bb87af4..387322124 100755 --- a/xmake/actions/build/main.lua +++ b/xmake/actions/build/main.lua @@ -77,10 +77,19 @@ function main() -- enter cache scope: build cache.enter("local.build") - -- host changed or project changed? reconfig it - if config.host() ~= os.host() or _project_changed(targetname) then + -- host changed? + if config.host() ~= os.host() then - -- config it first + -- reinit config + config.init() + + -- reconfig it + task.run("config", {target = targetname, clean = true}) + + -- project changed? + elseif _project_changed(targetname) then + + -- reconfig it task.run("config", {target = targetname}) end diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua index 532eb3301..eedeec158 100644 --- a/xmake/core/base/option.lua +++ b/xmake/core/base/option.lua @@ -493,10 +493,12 @@ function option.defaults(task) -- save the default value defaults[key] = o[4] + -- value with name? elseif o[3] == "v" and o[2] then + -- save the default value - defaults[o[2]] = o[4] + defaults[o[2]] = o[4] end end diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua index b76eaf743..f2a3c6147 100644 --- a/xmake/core/tool/compiler.lua +++ b/xmake/core/tool/compiler.lua @@ -447,7 +447,7 @@ function compiler:check(flags) local ok, errors = sandbox.load(ctool.check, flags) -- trace - utils.printf("checking for the flags %s ... %s", flags, utils.ifelse(ok, "ok", "no")) + utils.verbose("checking for the flags %s ... %s", flags, utils.ifelse(ok, "ok", "no")) if not ok then utils.verbose(errors) end diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua index 73f08bad0..52d1e7b72 100644 --- a/xmake/core/tool/linker.lua +++ b/xmake/core/tool/linker.lua @@ -374,7 +374,7 @@ function linker:check(flags) local ok, errors = sandbox.load(ltool.check, flags) -- trace - utils.printf("checking for the flags %s ... %s", flags, utils.ifelse(ok, "ok", "no")) + utils.verbose("checking for the flags %s ... %s", flags, utils.ifelse(ok, "ok", "no")) if not ok then utils.verbose(errors) end |
