diff options
| author | ruki <[email protected]> | 2015-05-27 08:31:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-05-27 08:31:36 +0800 |
| commit | 0e3df610b7db95590a9ad32eccfc7b2b2319b128 (patch) | |
| tree | 306336b11034e115f68dd74df2b0d1ee9a6d44ee /xmake/scripts/platform/platform.lua | |
| parent | f4562609df7ac3f395e5178e76fcefa2c1ffa980 (diff) | |
modify platform interfaces
Diffstat (limited to 'xmake/scripts/platform/platform.lua')
| -rw-r--r-- | xmake/scripts/platform/platform.lua | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/xmake/scripts/platform/platform.lua b/xmake/scripts/platform/platform.lua index dc5c9616e..4cc5df0da 100644 --- a/xmake/scripts/platform/platform.lua +++ b/xmake/scripts/platform/platform.lua @@ -52,22 +52,22 @@ function platform._configs(plat) local p = platform._load(plat) if p then - -- make configure + -- init configure platform._CONFIGS[plat]= {} configs = platform._CONFIGS[plat] - -- init configure - p.init(configs) + -- make configure + p.make(configs) end -- ok? return configs end --- init platform -function platform.init() +-- make the current platform configure +function platform.make() - -- init the current platform + -- make and get the current platform configure return platform._configs(config.get("plat")) end @@ -221,9 +221,8 @@ function platform.probe(configs, is_global) -- probe all platforms with the current host for _, plat in ipairs(plats) do local p = platform._load(plat) - local c = platform._configs(plat) - if p and p.probe and c and c.host and c.host == xmake._HOST then - p.probe(configs) + if p and p._PROBER and p._PROBER.done and p._HOST and p._HOST == xmake._HOST then + p._PROBER.done(configs) end end @@ -231,8 +230,8 @@ function platform.probe(configs, is_global) else -- probe it local p = platform._load(config.get("plat")) - if p and p.probe then - p.probe(configs) + if p and p._PROBER and p._PROBER.done then + p._PROBER.done(configs) end end end |
