diff options
| author | ruki <[email protected]> | 2016-01-25 21:19:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-02-15 19:10:26 +0800 |
| commit | e1c814493e1b884b4e35a0ff337ed5742ea96caf (patch) | |
| tree | 6afe59b0001928e2ab9d22de42a837bd007ee9f2 | |
| parent | 80f231295375a965495885e015963ad563d2935a (diff) | |
rename action filename
| -rw-r--r-- | xmake/core/action/build.lua (renamed from xmake/core/action/_build.lua) | 14 | ||||
| -rw-r--r-- | xmake/core/action/clean.lua (renamed from xmake/core/action/_clean.lua) | 16 | ||||
| -rw-r--r-- | xmake/core/action/config.lua (renamed from xmake/core/action/_config.lua) | 16 | ||||
| -rw-r--r-- | xmake/core/action/create.lua (renamed from xmake/core/action/_create.lua) | 16 | ||||
| -rw-r--r-- | xmake/core/action/debug.lua (renamed from xmake/core/action/_debug.lua) | 16 | ||||
| -rw-r--r-- | xmake/core/action/global.lua (renamed from xmake/core/action/_global.lua) | 16 | ||||
| -rw-r--r-- | xmake/core/action/install.lua (renamed from xmake/core/action/_install.lua) | 26 | ||||
| -rw-r--r-- | xmake/core/action/lua.lua (renamed from xmake/core/action/_lua.lua) | 16 | ||||
| -rw-r--r-- | xmake/core/action/man.lua (renamed from xmake/core/action/_man.lua) | 16 | ||||
| -rw-r--r-- | xmake/core/action/package.lua (renamed from xmake/core/action/_package.lua) | 54 | ||||
| -rw-r--r-- | xmake/core/action/run.lua (renamed from xmake/core/action/_run.lua) | 16 | ||||
| -rw-r--r-- | xmake/core/action/uninstall.lua (renamed from xmake/core/action/_uninstall.lua) | 18 | ||||
| -rw-r--r-- | xmake/core/base/action.lua (renamed from xmake/core/action/action.lua) | 8 | ||||
| -rw-r--r-- | xmake/core/base/main.lua | 2 |
14 files changed, 125 insertions, 125 deletions
diff --git a/xmake/core/action/_build.lua b/xmake/core/action/build.lua index bf660eab5..ee2ddc259 100644 --- a/xmake/core/action/_build.lua +++ b/xmake/core/action/build.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _build.lua +-- @file action_build.lua -- --- define module: _build -local _build = _build or {} +-- define module: action_build +local action_build = action_build or {} -- load modules local rule = require("base/rule") @@ -32,7 +32,7 @@ local project = require("base/project") local makefile = require("base/makefile") -- need access to the given file? -function _build.need(name) +function action_build.need(name) -- check assert(name) @@ -45,7 +45,7 @@ function _build.need(name) end -- done -function _build.done() +function action_build.done() -- the options local options = xmake._OPTIONS @@ -116,5 +116,5 @@ function _build.done() return true end --- return module: _build -return _build +-- return module: action_build +return action_build diff --git a/xmake/core/action/_clean.lua b/xmake/core/action/clean.lua index 71ed1280b..2cb2c840d 100644 --- a/xmake/core/action/_clean.lua +++ b/xmake/core/action/clean.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _clean.lua +-- @file action_clean.lua -- --- define module: _clean -local _clean = _clean or {} +-- define module: action_clean +local action_clean = action_clean or {} -- load modules local clean = require("base/clean") @@ -31,7 +31,7 @@ local utils = require("base/utils") local platform = require("base/platform") -- need access to the given file? -function _clean.need(name) +function action_clean.need(name) -- check assert(name) @@ -44,7 +44,7 @@ function _clean.need(name) end -- done -function _clean.done() +function action_clean.done() -- the options local options = xmake._OPTIONS @@ -68,7 +68,7 @@ function _clean.done() end -- the menu -function _clean.menu() +function action_clean.menu() return { -- xmake c @@ -102,5 +102,5 @@ function _clean.menu() } end --- return module: _clean -return _clean +-- return module: action_clean +return action_clean diff --git a/xmake/core/action/_config.lua b/xmake/core/action/config.lua index 9cf0af08e..65cbb4b6a 100644 --- a/xmake/core/action/_config.lua +++ b/xmake/core/action/config.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _config.lua +-- @file config.lua -- --- define module: _config -local _config = _config or {} +-- define module: action_config +local action_config = action_config or {} -- load modules local utils = require("base/utils") @@ -31,7 +31,7 @@ local makefile = require("base/makefile") local platform = require("base/platform") -- need access to the given file? -function _config.need(name) +function action_config.need(name) -- check assert(name) @@ -44,7 +44,7 @@ function _config.need(name) end -- done -function _config.done() +function action_config.done() -- the options local options = xmake._OPTIONS @@ -90,7 +90,7 @@ function _config.done() end -- the menu -function _config.menu() +function action_config.menu() return { -- xmake f @@ -211,5 +211,5 @@ function _config.menu() } end --- return module: _config -return _config +-- return module: action_config +return action_config diff --git a/xmake/core/action/_create.lua b/xmake/core/action/create.lua index 39c3ba83a..a19404653 100644 --- a/xmake/core/action/_create.lua +++ b/xmake/core/action/create.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _create.lua +-- @file action_create.lua -- --- define module: _create -local _create = _create or {} +-- define module: action_create +local action_create = action_create or {} -- load modules local path = require("base/path") @@ -29,14 +29,14 @@ local utils = require("base/utils") local template = require("base/template") -- need access to the given file? -function _create.need(name) +function action_create.need(name) -- no accessors return false end -- done -function _create.done() +function action_create.done() -- the options local options = xmake._OPTIONS @@ -63,7 +63,7 @@ function _create.done() end -- the menu -function _create.menu() +function action_create.menu() return { -- usage @@ -119,5 +119,5 @@ function _create.menu() } end --- return module: _create -return _create +-- return module: action_create +return action_create diff --git a/xmake/core/action/_debug.lua b/xmake/core/action/debug.lua index aba8d363e..c5d657196 100644 --- a/xmake/core/action/_debug.lua +++ b/xmake/core/action/debug.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _debug.lua +-- @file action_debug.lua -- --- define module: _debug -local _debug = _debug or {} +-- define module: action_debug +local action_debug = action_debug or {} -- load modules local utils = require("base/utils") @@ -29,7 +29,7 @@ local config = require("base/config") local platform = require("base/platform") -- need access to the given file? -function _debug.need(name) +function action_debug.need(name) -- check assert(name) @@ -42,7 +42,7 @@ function _debug.need(name) end -- done -function _debug.done() +function action_debug.done() -- TODO print("not implement!") @@ -52,7 +52,7 @@ function _debug.done() end -- the menu -function _debug.menu() +function action_debug.menu() return { -- xmake d @@ -85,5 +85,5 @@ function _debug.menu() } end --- return module: _debug -return _debug +-- return module: action_debug +return action_debug diff --git a/xmake/core/action/_global.lua b/xmake/core/action/global.lua index 2ccf85901..31b4ca47f 100644 --- a/xmake/core/action/_global.lua +++ b/xmake/core/action/global.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _global.lua +-- @file action_global.lua -- --- define module: _global -local _global = _global or {} +-- define module: action_global +local action_global = action_global or {} -- load modules local utils = require("base/utils") @@ -29,7 +29,7 @@ local global = require("base/global") local platform = require("base/platform") -- need access to the given file? -function _global.need(name) +function action_global.need(name) -- check assert(name) @@ -42,7 +42,7 @@ function _global.need(name) end -- done -function _global.done() +function action_global.done() -- probe the global platform configure if not platform.probe(true) then @@ -68,7 +68,7 @@ function _global.done() end -- the menu -function _global.menu() +function action_global.menu() return { -- xmake g @@ -100,5 +100,5 @@ function _global.menu() } end --- return module: _global -return _global +-- return module: action_global +return action_global diff --git a/xmake/core/action/_install.lua b/xmake/core/action/install.lua index 788584fdd..b56514513 100644 --- a/xmake/core/action/_install.lua +++ b/xmake/core/action/install.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _install.lua +-- @file action_install.lua -- --- define module: _install -local _install = _install or {} +-- define module: action_install +local action_install = action_install or {} -- load modules local utils = require("base/utils") @@ -33,14 +33,14 @@ local project = require("base/project") local platform = require("base/platform") -- need access to the given file? -function _install.need(name) +function action_install.need(name) -- no accessors return false end -- make configure for the given target -function _install._makeconf(configs, target_name, target) +function action_install._makeconf(configs, target_name, target) -- check assert(configs and target_name and target) @@ -74,7 +74,7 @@ function _install._makeconf(configs, target_name, target) end -- package target -function _install._package(target_name) +function action_install._package(target_name) -- get the target name if not target_name or target_name == "all" then @@ -91,7 +91,7 @@ function _install._package(target_name) end -- done -function _install.done() +function action_install.done() -- the options local options = xmake._OPTIONS @@ -111,7 +111,7 @@ function _install.done() end -- package the given target first - if not _install._package(options.target) then + if not action_install._package(options.target) then -- errors utils.error("package: failed!") return false @@ -158,13 +158,13 @@ function _install.done() -- make configure for the given target if target_name and target_name ~= "all" then - if not _install._makeconf(configs, target_name, targets[target_name]) then + if not action_install._makeconf(configs, target_name, targets[target_name]) then utils.error("make target configure: %s failed!", target_name) return false end else for target_name, target in pairs(targets) do - if not _install._makeconf(configs, target_name, target) then + if not action_install._makeconf(configs, target_name, target) then utils.error("make target configure: %s failed!", target_name) return false end @@ -186,7 +186,7 @@ function _install.done() end -- the menu -function _install.menu() +function action_install.menu() return { -- xmake i @@ -220,5 +220,5 @@ function _install.menu() } end --- return module: _install -return _install +-- return module: action_install +return action_install diff --git a/xmake/core/action/_lua.lua b/xmake/core/action/lua.lua index 0ca841b83..c5a6ce1d5 100644 --- a/xmake/core/action/_lua.lua +++ b/xmake/core/action/lua.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _lua.lua +-- @file action_lua.lua -- --- define module: _lua -local _lua = _lua or {} +-- define module: action_lua +local action_lua = action_lua or {} -- load modules local os = require("base/os") @@ -33,7 +33,7 @@ local tools = require("tools/tools") local platform = require("base/platform") -- need access to the given file? -function _lua.need(name) +function action_lua.need(name) -- the options local options = xmake._OPTIONS @@ -55,7 +55,7 @@ function _lua.need(name) end -- done -function _lua.done() +function action_lua.done() -- the options local options = xmake._OPTIONS @@ -124,7 +124,7 @@ function _lua.done() end -- the menu -function _lua.menu() +function action_lua.menu() return { -- xmake l @@ -164,5 +164,5 @@ function _lua.menu() } end --- return module: _lua -return _lua +-- return module: action_lua +return action_lua diff --git a/xmake/core/action/_man.lua b/xmake/core/action/man.lua index 14a2b1e5a..1ba0aeeef 100644 --- a/xmake/core/action/_man.lua +++ b/xmake/core/action/man.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _man.lua +-- @file action_man.lua -- --- define module: _man -local _man = _man or {} +-- define module: action_man +local action_man = action_man or {} -- load modules local utils = require("base/utils") @@ -29,7 +29,7 @@ local config = require("base/config") local platform = require("base/platform") -- need access to the given file? -function _man.need(name) +function action_man.need(name) -- check assert(name) @@ -42,7 +42,7 @@ function _man.need(name) end -- done -function _man.done() +function action_man.done() -- TODO print("not implement!") @@ -52,7 +52,7 @@ function _man.done() end -- the menu -function _man.menu() +function action_man.menu() return { -- xmake m @@ -85,5 +85,5 @@ function _man.menu() } end --- return module: _man -return _man +-- return module: action_man +return action_man diff --git a/xmake/core/action/_package.lua b/xmake/core/action/package.lua index d55af5ada..7b809af56 100644 --- a/xmake/core/action/_package.lua +++ b/xmake/core/action/package.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _package.lua +-- @file action_package.lua -- --- define module: _package -local _package = _package or {} +-- define module: action_package +local action_package = action_package or {} -- load modules local rule = require("base/rule") @@ -35,14 +35,14 @@ local package = require("base/package") local platform = require("base/platform") -- need access to the given file? -function _package.need(name) +function action_package.need(name) -- no accessors return false end -- configure target for the given architecture -function _package._config(arch, target_name) +function action_package._config(arch, target_name) -- need not configure it if not arch then return true end @@ -52,7 +52,7 @@ function _package._config(arch, target_name) end -- build target for the given architecture -function _package._build(arch, target_name) +function action_package._build(arch, target_name) -- get the target name if not target_name or target_name == "all" then @@ -60,7 +60,7 @@ function _package._build(arch, target_name) end -- configure it first - if not _package._config(arch, target_name) then return false end + if not action_package._config(arch, target_name) then return false end -- build it if os.execute(string.format("xmake -P %s %s", xmake._PROJECT_DIR, target_name)) ~= 0 then @@ -74,7 +74,7 @@ function _package._build(arch, target_name) end -- backup the target files -function _package._backup(rootdir, filepath) +function action_package._backup(rootdir, filepath) -- the relative file path if filepath and path.is_absolute(filepath) then @@ -100,7 +100,7 @@ function _package._backup(rootdir, filepath) end -- make configure for the given target -function _package._makeconf(target_name, target) +function action_package._makeconf(target_name, target) -- check assert(target_name and target) @@ -110,7 +110,7 @@ function _package._makeconf(target_name, target) assert(options) -- the configs - local configs = _package._CONFIGS + local configs = action_package._CONFIGS assert(configs) -- the architecture @@ -144,10 +144,10 @@ function _package._makeconf(target_name, target) configs_arch.targetdir = rule.backupdir(target_name, arch) -- save the config file - configs_arch.config_h = _package._backup(configs_arch.targetdir, rule.config_h(target)) + configs_arch.config_h = action_package._backup(configs_arch.targetdir, rule.config_h(target)) -- save the target file - configs_arch.targetfile = _package._backup(configs_arch.targetdir, rule.targetfile(target_name, target)) + configs_arch.targetfile = action_package._backup(configs_arch.targetdir, rule.targetfile(target_name, target)) -- save the package script local packagescript = target.packagescript @@ -174,7 +174,7 @@ function _package._makeconf(target_name, target) end -- load configure for the given target -function _package._loadconf(target_name) +function action_package._loadconf(target_name) -- reload configure local errors = config.reload() @@ -204,13 +204,13 @@ function _package._loadconf(target_name) -- make configure for the given target if target_name and target_name ~= "all" then - if not _package._makeconf(target_name, targets[target_name]) then + if not action_package._makeconf(target_name, targets[target_name]) then utils.error("make target configure: %s failed!", target_name) return false end else for target_name, target in pairs(targets) do - if not _package._makeconf(target_name, target) then + if not action_package._makeconf(target_name, target) then utils.error("make target configure: %s failed!", target_name) return false end @@ -222,7 +222,7 @@ function _package._loadconf(target_name) end -- build target for all architectures -function _package._build_all(archs, target_name) +function action_package._build_all(archs, target_name) -- exists the given architectures? if archs then @@ -238,10 +238,10 @@ function _package._build_all(archs, target_name) arch = arch:trim() -- build it - if not _package._build(arch, target_name) then return false end + if not action_package._build(arch, target_name) then return false end -- load configure - if not _package._loadconf(target_name) then return false end + if not action_package._loadconf(target_name) then return false end end @@ -249,10 +249,10 @@ function _package._build_all(archs, target_name) else -- build it - if not _package._build(nil, target_name) then return false end + if not action_package._build(nil, target_name) then return false end -- load configure - if not _package._loadconf(target_name) then return false end + if not action_package._loadconf(target_name) then return false end end @@ -261,7 +261,7 @@ function _package._build_all(archs, target_name) end -- done -function _package.done() +function action_package.done() -- the options local options = xmake._OPTIONS @@ -271,8 +271,8 @@ function _package.done() print("package: ...") -- init configs - _package._CONFIGS = _package._CONFIGS or {} - local configs = _package._CONFIGS + action_package._CONFIGS = action_package._CONFIGS or {} + local configs = action_package._CONFIGS -- load the global configure first global.load() @@ -285,7 +285,7 @@ function _package.done() end -- build the given target first for all architectures - if not _package._build_all(options.archs, options.target) then + if not action_package._build_all(options.archs, options.target) then -- errors utils.error("build package failed!") return false @@ -306,7 +306,7 @@ function _package.done() end -- the menu -function _package.menu() +function action_package.menu() return { -- xmake p @@ -361,5 +361,5 @@ function _package.menu() } end --- return module: _package -return _package +-- return module: action_package +return action_package diff --git a/xmake/core/action/_run.lua b/xmake/core/action/run.lua index 31a73dbc8..3a3a351b7 100644 --- a/xmake/core/action/_run.lua +++ b/xmake/core/action/run.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _run.lua +-- @file action_run.lua -- --- define module: _run -local _run = _run or {} +-- define module: action_run +local action_run = action_run or {} -- load modules local rule = require("base/rule") @@ -32,7 +32,7 @@ local project = require("base/project") local platform = require("base/platform") -- need access to the given file? -function _run.need(name) +function action_run.need(name) -- check assert(name) @@ -45,7 +45,7 @@ function _run.need(name) end -- done -function _run.done() +function action_run.done() -- the options local options = xmake._OPTIONS @@ -138,7 +138,7 @@ function _run.done() end -- the menu -function _run.menu() +function action_run.menu() return { -- xmake r @@ -175,5 +175,5 @@ function _run.menu() } end --- return module: _run -return _run +-- return module: action_run +return action_run diff --git a/xmake/core/action/_uninstall.lua b/xmake/core/action/uninstall.lua index 93c944b3e..ebb72109c 100644 --- a/xmake/core/action/_uninstall.lua +++ b/xmake/core/action/uninstall.lua @@ -17,11 +17,11 @@ -- Copyright (C) 2009 - 2015, ruki All rights reserved. -- -- @author ruki --- @file _uninstall.lua +-- @file action_uninstall.lua -- --- define module: _uninstall -local _uninstall = _uninstall or {} +-- define module: action_uninstall +local action_uninstall = action_uninstall or {} -- load modules local utils = require("base/utils") @@ -34,14 +34,14 @@ local project = require("base/project") local platform = require("base/platform") -- need access to the given file? -function _uninstall.need(name) +function action_uninstall.need(name) -- no accessors return false end -- package target -function _uninstall._package(target_name) +function action_uninstall._package(target_name) -- get the target name if not target_name or target_name == "all" then @@ -59,7 +59,7 @@ end -- done -function _uninstall.done() +function action_uninstall.done() -- the options local options = xmake._OPTIONS @@ -123,7 +123,7 @@ function _uninstall.done() end -- the menu -function _uninstall.menu() +function action_uninstall.menu() return { -- xmake u @@ -156,5 +156,5 @@ function _uninstall.menu() } end --- return module: _uninstall -return _uninstall +-- return module: action_uninstall +return action_uninstall diff --git a/xmake/core/action/action.lua b/xmake/core/base/action.lua index deeacab57..2cb7c71cf 100644 --- a/xmake/core/action/action.lua +++ b/xmake/core/base/action.lua @@ -36,7 +36,7 @@ local platform = require("base/platform") function action._load(name) -- load the given action - return require("action/_" .. name) + return require("action/" .. name) end -- load the project file @@ -150,12 +150,12 @@ function action.list() -- find all action scripts local list = {} - local files = os.match(xmake._CORE_DIR .. "/action/_*.lua") + local files = os.match(xmake._CORE_DIR .. "/action/*.lua") if files then for _, file in ipairs(files) do local name = path.basename(file) - if name and name ~= "_build" then - table.insert(list, name:sub(2)) + if name and name ~= "build" then + table.insert(list, name) end end end diff --git a/xmake/core/base/main.lua b/xmake/core/base/main.lua index 470815701..ad521700b 100644 --- a/xmake/core/base/main.lua +++ b/xmake/core/base/main.lua @@ -28,7 +28,7 @@ local os = require("base/os") local path = require("base/path") local utils = require("base/utils") local option = require("base/option") -local action = require("action/action") +local action = require("base/action") -- init the option menu local menu = |
