summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2020-09-28 23:09:23 +0800
committerruki <[email protected]>2020-09-28 23:09:23 +0800
commit0c52f3a6ab4397c5be94c3293f4ae20d6b7a8b94 (patch)
treec6bacf9de25b6af942b5e7ac83bca8aa3cf1e5ce /xmake/modules
parent34e395ad9281d17382b1d1c5a4e7828a259720f0 (diff)
rename some pathes to paths
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/detect/packages/find_openssl.lua8
-rw-r--r--xmake/modules/detect/tools/find_cmake.lua2
-rw-r--r--xmake/modules/detect/tools/find_ollydbg.lua2
-rw-r--r--xmake/modules/detect/tools/find_python3.lua10
-rw-r--r--xmake/modules/detect/tools/find_rc.lua4
-rw-r--r--xmake/modules/detect/tools/find_sdar.lua12
-rw-r--r--xmake/modules/detect/tools/find_sdcc.lua2
-rw-r--r--xmake/modules/detect/tools/find_vsjitdebugger.lua2
-rw-r--r--xmake/modules/detect/tools/find_vswhere.lua2
-rw-r--r--xmake/modules/detect/tools/find_windbg.lua2
-rw-r--r--xmake/modules/detect/tools/find_x64dbg.lua2
-rw-r--r--xmake/modules/devel/git/submodule/update.lua8
-rw-r--r--xmake/modules/lib/detect/find_tool.lua8
13 files changed, 32 insertions, 32 deletions
diff --git a/xmake/modules/detect/packages/find_openssl.lua b/xmake/modules/detect/packages/find_openssl.lua
index 7c27ebd85..e56503c23 100644
--- a/xmake/modules/detect/packages/find_openssl.lua
+++ b/xmake/modules/detect/packages/find_openssl.lua
@@ -39,8 +39,8 @@ function main(opt)
-- init bits
local bits = (opt.arch == "x64" and "64" or "32")
- -- init search pathes
- local pathes = {"$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL %(" .. bits .. "-bit%)_is1;Inno Setup: App Path)",
+ -- init search paths
+ local paths = {"$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL %(" .. bits .. "-bit%)_is1;Inno Setup: App Path)",
"$(env PROGRAMFILES)/OpenSSL",
"$(env PROGRAMFILES)/OpenSSL-Win" .. bits,
"C:/OpenSSL",
@@ -49,7 +49,7 @@ function main(opt)
-- find library
local result = {links = {}, linkdirs = {}, includedirs = {}}
for _, name in ipairs({"libssl", "libcrypto"}) do
- local linkinfo = find_library(name, pathes, {suffixes = "lib"})
+ local linkinfo = find_library(name, paths, {suffixes = "lib"})
if linkinfo then
table.insert(result.links, linkinfo.link)
table.insert(result.linkdirs, linkinfo.linkdir)
@@ -62,7 +62,7 @@ function main(opt)
end
-- find include
- table.insert(result.includedirs, find_path("openssl/ssl.h", pathes, {suffixes = "include"}))
+ table.insert(result.includedirs, find_path("openssl/ssl.h", paths, {suffixes = "include"}))
-- ok
return result
diff --git a/xmake/modules/detect/tools/find_cmake.lua b/xmake/modules/detect/tools/find_cmake.lua
index ba9ad615e..49a8b6e42 100644
--- a/xmake/modules/detect/tools/find_cmake.lua
+++ b/xmake/modules/detect/tools/find_cmake.lua
@@ -40,7 +40,7 @@ function main(opt)
-- init options
opt = opt or {}
if is_host("windows") then
- opt.pathes = "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Kitware\\CMake;InstallDir)\\bin"
+ opt.paths = "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Kitware\\CMake;InstallDir)\\bin"
end
-- find program
diff --git a/xmake/modules/detect/tools/find_ollydbg.lua b/xmake/modules/detect/tools/find_ollydbg.lua
index 3d2c33cd9..4a2da3621 100644
--- a/xmake/modules/detect/tools/find_ollydbg.lua
+++ b/xmake/modules/detect/tools/find_ollydbg.lua
@@ -45,7 +45,7 @@ function main(opt)
-- init options
opt = opt or {}
- opt.pathes = opt.pathes or function ()
+ opt.paths = opt.paths or function ()
for _, reg in ipairs({"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger"}) do
return (val("reg " .. reg) or ""):match("\"(.-)\"")
end
diff --git a/xmake/modules/detect/tools/find_python3.lua b/xmake/modules/detect/tools/find_python3.lua
index df3daff49..3e5642aef 100644
--- a/xmake/modules/detect/tools/find_python3.lua
+++ b/xmake/modules/detect/tools/find_python3.lua
@@ -40,11 +40,11 @@ function main(opt)
-- init options
opt = opt or {}
if is_host("windows") then
- opt.pathes = opt.pathes or {}
- table.insert(opt.pathes, "$(reg HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.7\\InstallPath;ExecutablePath)")
- table.insert(opt.pathes, "$(reg HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.7-32\\InstallPath;ExecutablePath)")
- table.insert(opt.pathes, "$(reg HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.6\\InstallPath;ExecutablePath)")
- table.insert(opt.pathes, "$(reg HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.6-32\\InstallPath;ExecutablePath)")
+ opt.paths = opt.paths or {}
+ table.insert(opt.paths, "$(reg HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.7\\InstallPath;ExecutablePath)")
+ table.insert(opt.paths, "$(reg HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.7-32\\InstallPath;ExecutablePath)")
+ table.insert(opt.paths, "$(reg HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.6\\InstallPath;ExecutablePath)")
+ table.insert(opt.paths, "$(reg HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.6-32\\InstallPath;ExecutablePath)")
end
-- find program
diff --git a/xmake/modules/detect/tools/find_rc.lua b/xmake/modules/detect/tools/find_rc.lua
index 0fcef12f8..5edd8d69c 100644
--- a/xmake/modules/detect/tools/find_rc.lua
+++ b/xmake/modules/detect/tools/find_rc.lua
@@ -64,8 +64,8 @@ function main(opt)
if vcvars and vcvars.WindowsSdkDir and vcvars.WindowsSDKVersion then
local bindir = path.join(vcvars.WindowsSdkDir, "bin", vcvars.WindowsSDKVersion, arch)
if os.isdir(bindir) then
- opt.pathes = opt.pathes or {}
- table.insert(opt.pathes, bindir)
+ opt.paths = opt.paths or {}
+ table.insert(opt.paths, bindir)
end
end
end
diff --git a/xmake/modules/detect/tools/find_sdar.lua b/xmake/modules/detect/tools/find_sdar.lua
index 48d055bdf..eafa1a5da 100644
--- a/xmake/modules/detect/tools/find_sdar.lua
+++ b/xmake/modules/detect/tools/find_sdar.lua
@@ -40,17 +40,17 @@ function main(opt)
opt = opt or {}
opt.command = opt.command or "--version"
- -- add search pathes
- local pathes = {}
+ -- add search paths
+ local paths = {}
local bindir = get_config("bin")
if bindir and os.isdir(bindir) then
- table.insert(pathes, bindir)
+ table.insert(paths, bindir)
end
if is_host("windows") then
- table.insert(pathes, "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\SDCC)\\bin")
+ table.insert(paths, "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\SDCC)\\bin")
end
- if #pathes > 0 then
- opt.pathes = pathes
+ if #paths > 0 then
+ opt.paths = paths
end
-- find program
diff --git a/xmake/modules/detect/tools/find_sdcc.lua b/xmake/modules/detect/tools/find_sdcc.lua
index 5c2867d02..f5db20b32 100644
--- a/xmake/modules/detect/tools/find_sdcc.lua
+++ b/xmake/modules/detect/tools/find_sdcc.lua
@@ -50,7 +50,7 @@ function main(opt)
table.insert(paths, "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\SDCC)\\bin")
end
if #paths > 0 then
- opt.pathes = paths
+ opt.paths = paths
end
-- find program
diff --git a/xmake/modules/detect/tools/find_vsjitdebugger.lua b/xmake/modules/detect/tools/find_vsjitdebugger.lua
index 2025557e0..aaf7fcf9d 100644
--- a/xmake/modules/detect/tools/find_vsjitdebugger.lua
+++ b/xmake/modules/detect/tools/find_vsjitdebugger.lua
@@ -45,7 +45,7 @@ function main(opt)
-- init options
opt = opt or {}
- opt.pathes = opt.pathes or function ()
+ opt.paths = opt.paths or function ()
for _, reg in ipairs({"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger"}) do
return (val("reg " .. reg) or ""):match("\"(.-)\"")
end
diff --git a/xmake/modules/detect/tools/find_vswhere.lua b/xmake/modules/detect/tools/find_vswhere.lua
index 40c00bf25..ec0ad3986 100644
--- a/xmake/modules/detect/tools/find_vswhere.lua
+++ b/xmake/modules/detect/tools/find_vswhere.lua
@@ -49,7 +49,7 @@ function main(opt)
-- find program
opt.check = opt.check or "-?"
opt.command = opt.command or "-?"
- opt.pathes = opt.pathes or
+ opt.paths = opt.paths or
{
"$(env ProgramFiles%(x86%))\\Microsoft Visual Studio\\Installer",
"$(env ProgramFiles)\\Microsoft Visual Studio\\Installer"
diff --git a/xmake/modules/detect/tools/find_windbg.lua b/xmake/modules/detect/tools/find_windbg.lua
index 7bb6d2453..f1c335faa 100644
--- a/xmake/modules/detect/tools/find_windbg.lua
+++ b/xmake/modules/detect/tools/find_windbg.lua
@@ -45,7 +45,7 @@ function main(opt)
-- init options
opt = opt or {}
- opt.pathes = opt.pathes or function ()
+ opt.paths = opt.paths or function ()
for _, reg in ipairs({"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger"}) do
return (val("reg " .. reg) or ""):match("\"(.-)\"")
end
diff --git a/xmake/modules/detect/tools/find_x64dbg.lua b/xmake/modules/detect/tools/find_x64dbg.lua
index 4f265c99d..06015c011 100644
--- a/xmake/modules/detect/tools/find_x64dbg.lua
+++ b/xmake/modules/detect/tools/find_x64dbg.lua
@@ -45,7 +45,7 @@ function main(opt)
-- init options
opt = opt or {}
- opt.pathes = opt.pathes or function ()
+ opt.paths = opt.paths or function ()
for _, reg in ipairs({"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger"}) do
return (val("reg " .. reg) or ""):match("\"(.-)\"")
end
diff --git a/xmake/modules/devel/git/submodule/update.lua b/xmake/modules/devel/git/submodule/update.lua
index 15ff08950..106b4ef62 100644
--- a/xmake/modules/devel/git/submodule/update.lua
+++ b/xmake/modules/devel/git/submodule/update.lua
@@ -24,14 +24,14 @@ import("lib.detect.find_tool")
-- update submodule
--
--- @param opt the argument options, e.g. repodir, init, remote, force, checkout, merge, rebase, recursive, reference, pathes
+-- @param opt the argument options, e.g. repodir, init, remote, force, checkout, merge, rebase, recursive, reference, paths
--
-- @code
--
-- import("devel.git.submodule")
--
-- submodule.update("master", {repodir = "/tmp/xmake", init = true, remote = true})
--- submodule.update("v1.0.1", {repodir = "/tmp/xmake", recursive = true, reference = "xxx", pathes = "xxx"})
+-- submodule.update("v1.0.1", {repodir = "/tmp/xmake", recursive = true, reference = "xxx", paths = "xxx"})
--
-- @endcode
--
@@ -54,8 +54,8 @@ function main(opt)
table.insert(argv, "--reference")
table.insert(argv, opt.reference)
end
- if opt.pathes then
- table.join2(argv, opt.pathes)
+ if opt.paths or opt.pathes then
+ table.join2(argv, opt.paths or opt.pathes)
end
-- enter repository directory
diff --git a/xmake/modules/lib/detect/find_tool.lua b/xmake/modules/lib/detect/find_tool.lua
index ada6f3a27..34ad0c20c 100644
--- a/xmake/modules/lib/detect/find_tool.lua
+++ b/xmake/modules/lib/detect/find_tool.lua
@@ -39,7 +39,7 @@ end
-- find tool
--
-- @param name the tool name
--- @param opt the options, e.g. {program = "xcrun -sdk macosx clang", pathes = {"/usr/bin"},
+-- @param opt the options, e.g. {program = "xcrun -sdk macosx clang", paths = {"/usr/bin"},
-- check = function (tool) os.run("%s -h", tool) end, version = true
-- force = true, cachekey = "xxx", envs = {PATH = "xxx"}}
--
@@ -49,11 +49,11 @@ end
--
-- local tool = find_tool("clang")
-- local tool = find_tool("clang", {program = "xcrun -sdk macosx clang"})
--- local tool = find_tool("clang", {pathes = {"/usr/bin", "/usr/local/bin"}})
+-- local tool = find_tool("clang", {paths = {"/usr/bin", "/usr/local/bin"}})
-- local tool = find_tool("clang", {check = "--help"}) -- simple check command: ccache --help
-- local tool = find_tool("clang", {check = function (tool) os.run("%s -h", tool) end})
--- local tool = find_tool("clang", {pathes = {"$(env PATH)", "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger)"}})
--- local tool = find_tool("clang", {pathes = {"$(env PATH)", function () return "/usr/bin"end}})
+-- local tool = find_tool("clang", {paths = {"$(env PATH)", "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger)"}})
+-- local tool = find_tool("clang", {paths = {"$(env PATH)", function () return "/usr/bin"end}})
-- local tool = find_tool("ccache", {version = true})
--
-- @endcode