summaryrefslogtreecommitdiff
path: root/xmake/scripts/action/_config.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-05-26 10:19:43 +0800
committerruki <[email protected]>2015-05-26 10:19:43 +0800
commitf4562609df7ac3f395e5178e76fcefa2c1ffa980 (patch)
tree526caad47b590de1be57996ee19b28d4e34d082a /xmake/scripts/action/_config.lua
parent49ae120e090b2d4dd15e486ade2dfc2ea1ded440 (diff)
probe configure for macosx
Diffstat (limited to 'xmake/scripts/action/_config.lua')
-rw-r--r--xmake/scripts/action/_config.lua21
1 files changed, 20 insertions, 1 deletions
diff --git a/xmake/scripts/action/_config.lua b/xmake/scripts/action/_config.lua
index 46e123800..71d4d45af 100644
--- a/xmake/scripts/action/_config.lua
+++ b/xmake/scripts/action/_config.lua
@@ -27,11 +27,30 @@ local _config = _config or {}
local utils = require("base/utils")
local config = require("base/config")
local makefile = require("base/makefile")
+local platform = require("platform/platform")
-- done the given config
function _config.done()
- -- save configs
+ -- wrap the global configure for more convenient to get and set values
+ local config_wrapped = {}
+ setmetatable(config_wrapped,
+ {
+ __index = function(tbl, key)
+ return config.get(key)
+ end,
+ __newindex = function(tbl, key, val)
+ config.set(key, val)
+ end
+ })
+
+ -- probe the configure
+ platform.probe(config_wrapped, false)
+
+ -- dump config
+ config.dump()
+
+ -- save the configure
if not config.savexconf() then
-- error
utils.error("save configure failed!")