From b7344cd33b93ba1a1aa96eea057adf4b71f7139a Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 16 May 2015 20:00:45 +0800 Subject: add import for the configure file --- xmake/scripts/base/config.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xmake/scripts/base/config.lua') diff --git a/xmake/scripts/base/config.lua b/xmake/scripts/base/config.lua index cb169550e..31fb4dd81 100644 --- a/xmake/scripts/base/config.lua +++ b/xmake/scripts/base/config.lua @@ -223,13 +223,13 @@ function config.loadxconf() -- load and execute the xmake.xconf local path = options.project .. "/xmake.xconf" - local configs, errors = preprocessor.loadfile(path, "config", configures, {"target"}) - - -- save configs - config._CONFIGS = configs + local newenv, errors = preprocessor.loadfile(path, "config", configures, {"target"}) -- exists local configures? - if configs then + if newenv then + + -- save configs + config._CONFIGS = newenv._CONFIGS -- clear configs if the host environment has been changed local target = config.getarget() @@ -248,7 +248,7 @@ function config.loadxconf() -- init configs config._CONFIGS = config._CONFIGS or {} - configs = config._CONFIGS + local configs = config._CONFIGS -- init targets configs._TARGET = configs._TARGET or {} -- cgit v1.3.1