From f0f9b217ddb81084a411d09a4a23292716b20c46 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 4 Jun 2015 16:47:21 +0800 Subject: skip the clean option --- xmake/scripts/base/global.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'xmake/scripts/base/global.lua') diff --git a/xmake/scripts/base/global.lua b/xmake/scripts/base/global.lua index 9e43213ee..2b3582a23 100644 --- a/xmake/scripts/base/global.lua +++ b/xmake/scripts/base/global.lua @@ -133,6 +133,11 @@ function global._file() return global.directory() .. "/xmake.xconf" end +-- need configure? +function global._need(name) + return name and name ~= "verbose" and name ~= "clean" +end + -- get the given configure from the current function global.get(name) @@ -226,7 +231,7 @@ function global.loadxconf() local configures = {} for _, o in ipairs(option._MENU.global.options) do local name = o[2] - if name and name ~= "verbose" then + if global._need(name) then configures[i] = name i = i + 1 end @@ -258,8 +263,8 @@ function global.loadxconf() -- check assert(type(k) == "string") - -- skip some options - if not k:startswith("_") and k ~= "verbose" then + -- need configure it? + if not k:startswith("_") and global._need(k) then configs[k] = v end end @@ -270,8 +275,8 @@ function global.loadxconf() -- check assert(type(k) == "string") - -- skip some options - if k ~= "verbose" then + -- need configure it? + if global._need(k) then -- save the default option if not configs[k] then -- cgit v1.3.1