diff options
| author | ruki <[email protected]> | 2015-05-20 08:50:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-05-20 08:50:04 +0800 |
| commit | 9c161e7f113de8c020df176c1fab87e8c93083f5 (patch) | |
| tree | 3946ab2b828aa9365619eb07ed0d51b6f1fd721d /xmake/scripts/base/main.lua | |
| parent | bf3130929b7cf628dad0300a835e13c7bb91feb0 (diff) | |
make config for the current target
Diffstat (limited to 'xmake/scripts/base/main.lua')
| -rw-r--r-- | xmake/scripts/base/main.lua | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/xmake/scripts/base/main.lua b/xmake/scripts/base/main.lua index e09613254..97ec71b01 100644 --- a/xmake/scripts/base/main.lua +++ b/xmake/scripts/base/main.lua @@ -282,19 +282,17 @@ function main._done_option() end assert(options.file) + -- init the build directory + if options.buildir and path.is_absolute(options.buildir) then + options.buildir = path.relative(options.buildir, xmake._PROJECT_DIR) + end + -- load xmake.xconf file first local errors = config.loadxconf() if not errors then -- load xmake.xproj file errors = project.loadxproj(options.file) end - assert(config._CONFIGS) - - -- init the build directory - if config._CONFIGS.buildir and path.is_absolute(config._CONFIGS.buildir) then - config._CONFIGS.buildir = path.relative(config._CONFIGS.buildir, xmake._PROJECT_DIR) - end - assert(config._CONFIGS.buildir) -- done help if options.help then @@ -329,7 +327,7 @@ function main._done_option() -- init platform if not platform.init() then -- error - utils.error("init platform: %s failed!", config.target().plat) + utils.error("init platform: %s failed!", config.get("plat")) return false end |
