summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-09-25 00:44:21 +0800
committerruki <[email protected]>2020-09-25 00:44:21 +0800
commitba3a8eba461121eed5028f3e1f5c426fda348637 (patch)
treeb338a35461ad31cbf21ed5442f39eb5a25ddf887
parent38ba8f1dac4395c5c1b6d3e4091529079c409ab6 (diff)
fix typo for some internal pathes
-rw-r--r--xmake/actions/require/impl/environment.lua4
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_directory.lua20
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_file.lua6
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_library.lua14
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_path.lua6
-rw-r--r--xmake/modules/detect/sdks/find_cuda.lua16
-rw-r--r--xmake/modules/detect/sdks/find_qt.lua18
-rw-r--r--xmake/modules/detect/sdks/find_vcpkgdir.lua8
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua24
-rw-r--r--xmake/modules/lib/detect/pkg_config.lua6
-rw-r--r--xmake/toolchains/msvc/load.lua2
11 files changed, 62 insertions, 62 deletions
diff --git a/xmake/actions/require/impl/environment.lua b/xmake/actions/require/impl/environment.lua
index 39ee7143f..5adece2ca 100644
--- a/xmake/actions/require/impl/environment.lua
+++ b/xmake/actions/require/impl/environment.lua
@@ -34,7 +34,7 @@ import("package")
--
function enter()
- -- set search pathes of toolchains
+ -- set search paths of toolchains
environment.enter("toolchains")
-- unzip is necessary
@@ -75,6 +75,6 @@ function leave()
-- leave the environments of git and 7z
packagenv.leave("7z", "git")
- -- restore search pathes of toolchains
+ -- restore search paths of toolchains
environment.leave("toolchains")
end
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_directory.lua b/xmake/core/sandbox/modules/import/lib/detect/find_directory.lua
index 31c862b1a..3ee06a416 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_directory.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_directory.lua
@@ -32,7 +32,7 @@ local vformat = require("sandbox/modules/vformat")
-- find directory
--
-- @param name the directory name
--- @param pathes the search pathes (e.g. dirs, pathes, winreg pathes)
+-- @param paths the search paths (e.g. dirs, paths, winreg paths)
-- @param opt the options, e.g. {suffixes = {"/aa", "/bb"}}
--
-- @return the directory path
@@ -46,28 +46,28 @@ local vformat = require("sandbox/modules/vformat")
--
-- @endcode
--
-function sandbox_lib_detect_find_directory.main(name, pathes, opt)
+function sandbox_lib_detect_find_directory.main(name, paths, opt)
-- init options
opt = opt or {}
- -- init pathes
- pathes = table.wrap(pathes)
+ -- init paths
+ paths = table.wrap(paths)
- -- append suffixes to pathes
+ -- append suffixes to paths
local suffixes = table.wrap(opt.suffixes)
if #suffixes > 0 then
- local pathes_new = {}
- for _, parent in ipairs(pathes) do
+ local paths_new = {}
+ for _, parent in ipairs(paths) do
for _, suffix in ipairs(suffixes) do
- table.insert(pathes_new, path.join(parent, suffix))
+ table.insert(paths_new, path.join(parent, suffix))
end
end
- pathes = pathes_new
+ paths = paths_new
end
-- find file
- for _, _path in ipairs(pathes) do
+ for _, _path in ipairs(paths) do
-- format path for builtin variables
if type(_path) == "function" then
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_file.lua b/xmake/core/sandbox/modules/import/lib/detect/find_file.lua
index 99ce9faad..e865273da 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_file.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_file.lua
@@ -50,7 +50,7 @@ end
-- find file
--
-- @param name the file name
--- @param pathes the search pathes (e.g. dirs, pathes, winreg pathes)
+-- @param paths the search paths (e.g. dirs, paths, winreg paths)
-- @param opt the options, e.g. {suffixes = {"/aa", "/bb"}}
--
-- @return the file path
@@ -64,14 +64,14 @@ end
--
-- @endcode
--
-function sandbox_lib_detect_find_file.main(name, pathes, opt)
+function sandbox_lib_detect_find_file.main(name, paths, opt)
-- init options
opt = opt or {}
-- find file
local suffixes = table.wrap(opt.suffixes)
- for _, _path in ipairs(table.wrap(pathes)) do
+ for _, _path in ipairs(table.wrap(paths)) do
-- format path for builtin variables
if type(_path) == "function" then
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_library.lua b/xmake/core/sandbox/modules/import/lib/detect/find_library.lua
index eddc1ebfc..67ab01b06 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_library.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_library.lua
@@ -35,7 +35,7 @@ local find_file = import("lib.detect.find_file")
-- find library
--
-- @param names the library names
--- @param pathes the search pathes
+-- @param paths the search paths
-- @param opt the options, e.g. {kind = "static/shared", suffixes = {"/aa", "/bb"}}
--
-- @return {kind = "static", link = "crypto", linkdir = "/usr/local/lib", filename = "libcrypto.a"}
@@ -47,10 +47,10 @@ local find_file = import("lib.detect.find_file")
--
-- @endcode
--
-function sandbox_lib_detect_find_library.main(names, pathes, opt)
+function sandbox_lib_detect_find_library.main(names, paths, opt)
- -- no pathes?
- if not pathes or #pathes == 0 then
+ -- no paths?
+ if not paths or #paths == 0 then
return
end
@@ -60,14 +60,14 @@ function sandbox_lib_detect_find_library.main(names, pathes, opt)
-- init kinds
kinds = opt.kind or {"static", "shared"}
- -- find library file from the given pathes
+ -- find library file from the given paths
for _, name in ipairs(table.wrap(names)) do
for _, kind in ipairs(table.wrap(kinds)) do
- local filepath = find_file(target.filename(name, kind), pathes, opt)
+ local filepath = find_file(target.filename(name, kind), paths, opt)
if not filepath and config.is_plat("mingw") then
-- for the mingw platform, it is compatible with the libxxx.a and xxx.lib
local formats = {static = "lib$(name).a", shared = "lib$(name).so"}
- filepath = find_file(target.filename(name, kind, {format = formats[kind]}), pathes, opt)
+ filepath = find_file(target.filename(name, kind, {format = formats[kind]}), paths, opt)
end
if filepath then
local filename = path.filename(filepath)
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_path.lua b/xmake/core/sandbox/modules/import/lib/detect/find_path.lua
index 7afdc4bd0..3df0c32b1 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_path.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_path.lua
@@ -53,7 +53,7 @@ end
-- find path
--
-- @param name the path name
--- @param pathes the search pathes (e.g. dirs, pathes, winreg pathes)
+-- @param paths the search paths (e.g. dirs, paths, winreg paths)
-- @param opt the options, e.g. {suffixes = {"/aa", "/bb"}}
--
-- @return the path
@@ -69,14 +69,14 @@ end
--
-- @endcode
--
-function sandbox_lib_detect_find_path.main(name, pathes, opt)
+function sandbox_lib_detect_find_path.main(name, paths, opt)
-- init options
opt = opt or {}
-- find path
local suffixes = table.wrap(opt.suffixes)
- for _, _path in ipairs(table.wrap(pathes)) do
+ for _, _path in ipairs(table.wrap(paths)) do
-- format path for builtin variables
if type(_path) == "function" then
diff --git a/xmake/modules/detect/sdks/find_cuda.lua b/xmake/modules/detect/sdks/find_cuda.lua
index 78a08f9bf..6cc37995c 100644
--- a/xmake/modules/detect/sdks/find_cuda.lua
+++ b/xmake/modules/detect/sdks/find_cuda.lua
@@ -29,21 +29,21 @@ import("core.project.config")
function _find_sdkdir()
-- init the search directories
- local pathes = {}
+ local paths = {}
if os.host() == "macosx" then
- table.insert(pathes, "/Developer/NVIDIA/CUDA/bin")
- table.insert(pathes, "/Developer/NVIDIA/CUDA*/bin")
+ table.insert(paths, "/Developer/NVIDIA/CUDA/bin")
+ table.insert(paths, "/Developer/NVIDIA/CUDA*/bin")
elseif os.host() == "windows" then
- table.insert(pathes, "$(env CUDA_PATH)/bin")
+ table.insert(paths, "$(env CUDA_PATH)/bin")
else
-- find from default symbol link dir
- table.insert(pathes, "/usr/local/cuda/bin")
- table.insert(pathes, "/usr/local/cuda*/bin")
+ table.insert(paths, "/usr/local/cuda/bin")
+ table.insert(paths, "/usr/local/cuda*/bin")
end
- table.insert(pathes, "$(env PATH)")
+ table.insert(paths, "$(env PATH)")
-- attempt to find nvcc
- local nvcc = find_file(os.host() == "windows" and "nvcc.exe" or "nvcc", pathes)
+ local nvcc = find_file(os.host() == "windows" and "nvcc.exe" or "nvcc", paths)
if nvcc then
return path.directory(path.directory(nvcc))
end
diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua
index 144cbdff0..f3ba95582 100644
--- a/xmake/modules/detect/sdks/find_qt.lua
+++ b/xmake/modules/detect/sdks/find_qt.lua
@@ -70,13 +70,13 @@ function _find_sdkdir(sdkdir, sdkver)
table.insert(subdirs, "bin")
-- init the search directories
- local pathes = {}
+ local paths = {}
if sdkdir then
- table.insert(pathes, sdkdir)
+ table.insert(paths, sdkdir)
end
if is_host("windows") then
- -- add pathes from registry
+ -- add paths from registry
local regs =
{
"HKEY_CLASSES_ROOT\\Applications\\QtProject.QtCreator.c\\shell\\Open\\Command",
@@ -85,7 +85,7 @@ function _find_sdkdir(sdkdir, sdkver)
"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\Applications\\QtProject.QtCreator.cpp\\shell\\Open\\Command"
}
for _, reg in ipairs(regs) do
- table.insert(pathes, function ()
+ table.insert(paths, function ()
local value = val("reg " .. reg)
if value then
local p = value:find("\\Tools\\QtCreator", 1, true)
@@ -99,18 +99,18 @@ function _find_sdkdir(sdkdir, sdkver)
-- add root logical drive pates, e.g. C:/Qt/Qtx.x.x, D:/Qtx.x.x ..
for idx, drive in ipairs(winos.logical_drives()) do
if idx < 5 then
- table.insert(pathes, path.join(drive, "Qt", "Qt*"))
+ table.insert(paths, path.join(drive, "Qt", "Qt*"))
else
break
end
end
else
- table.insert(pathes, "~/Qt")
- table.insert(pathes, "~/Qt*")
+ table.insert(paths, "~/Qt")
+ table.insert(paths, "~/Qt*")
end
-- attempt to find qmake
- local qmake = find_file(is_host("windows") and "qmake.exe" or "qmake", pathes, {suffixes = subdirs})
+ local qmake = find_file(is_host("windows") and "qmake.exe" or "qmake", paths, {suffixes = subdirs})
if qmake then
return path.directory(path.directory(qmake))
end
@@ -123,7 +123,7 @@ function _find_qmake(sdkdir, sdkver)
sdkdir = _find_sdkdir(sdkdir, sdkver)
-- get the bin directory
- local qmake = find_tool("qmake", {pathes = sdkdir and path.join(sdkdir, "bin")})
+ local qmake = find_tool("qmake", {paths = sdkdir and path.join(sdkdir, "bin")})
if qmake then
return qmake.program
end
diff --git a/xmake/modules/detect/sdks/find_vcpkgdir.lua b/xmake/modules/detect/sdks/find_vcpkgdir.lua
index e6445e66d..de8cba24e 100644
--- a/xmake/modules/detect/sdks/find_vcpkgdir.lua
+++ b/xmake/modules/detect/sdks/find_vcpkgdir.lua
@@ -29,9 +29,9 @@ import("core.project.config")
function _find_vcpkgdir(sdkdir)
-- init the search directories
- local pathes = {}
+ local paths = {}
if sdkdir then
- table.insert(pathes, sdkdir)
+ table.insert(paths, sdkdir)
end
if is_host("windows") then
-- attempt to read path info after running `vcpkg integrate install`
@@ -39,7 +39,7 @@ function _find_vcpkgdir(sdkdir)
if os.isfile(pathfile) then
local dir = io.readfile(pathfile):trim()
if os.isdir(dir) then
- table.insert(pathes, dir)
+ table.insert(paths, dir)
end
end
else
@@ -47,7 +47,7 @@ function _find_vcpkgdir(sdkdir)
end
-- attempt to find vcpkg
- local vcpkg = find_file(is_host("windows") and "vcpkg.exe" or "vcpkg", pathes)
+ local vcpkg = find_file(is_host("windows") and "vcpkg.exe" or "vcpkg", paths)
if vcpkg then
return path.directory(vcpkg)
end
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index c9cb7589d..369b4e98d 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -211,13 +211,13 @@ function main(opt)
end
-- find vcvarsall.bat or vcvars32.bat
- local pathes =
+ local paths =
{
path.join(VCInstallDir, "Auxiliary", "Build"),
path.join(VCInstallDir, "bin"),
VCInstallDir
}
- local vcvarsall = find_file("vcvarsall.bat", pathes) or find_file("vcvars32.bat", pathes)
+ local vcvarsall = find_file("vcvarsall.bat", paths) or find_file("vcvars32.bat", paths)
if vcvarsall and os.isfile(vcvarsall) then
-- load vcvarsall
@@ -250,8 +250,8 @@ function main(opt)
end
end
- -- init pathes
- local pathes =
+ -- init paths
+ local paths =
{
format("$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;%s)\\VC", version),
format("$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;%s)\\VC7\\bin", version),
@@ -260,24 +260,24 @@ function main(opt)
format("$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VS7;%s)\\VC\\Auxiliary\\Build", version)
}
if vsenvs[version] then
- table.insert(pathes, format("$(env %s)\\..\\..\\VC", vsenvs[version]))
+ table.insert(paths, format("$(env %s)\\..\\..\\VC", vsenvs[version]))
end
if vswhere_VCAuxiliaryBuildDir and os.isdir(vswhere_VCAuxiliaryBuildDir) then
- table.insert(pathes, vswhere_VCAuxiliaryBuildDir)
+ table.insert(paths, vswhere_VCAuxiliaryBuildDir)
end
- -- find vs from some logical drives pathes
+ -- find vs from some logical drives paths
for _, logical_drive in ipairs(winos.logical_drives()) do
if os.isdir(path.join(logical_drive, "Program Files (x86)")) then
- table.insert(pathes, path.join(logical_drive, "Program Files (x86)", "Microsoft Visual Studio", vsvers[version], "*", "VC", "Auxiliary", "Build"))
- table.insert(pathes, path.join(logical_drive, "Program Files (x86)", "Microsoft Visual Studio " .. version, "VC"))
+ table.insert(paths, path.join(logical_drive, "Program Files (x86)", "Microsoft Visual Studio", vsvers[version], "*", "VC", "Auxiliary", "Build"))
+ table.insert(paths, path.join(logical_drive, "Program Files (x86)", "Microsoft Visual Studio " .. version, "VC"))
end
- table.insert(pathes, path.join(logical_drive, "Program Files", "Microsoft Visual Studio", vsvers[version], "*", "VC", "Auxiliary", "Build"))
- table.insert(pathes, path.join(logical_drive, "Program Files", "Microsoft Visual Studio " .. version, "VC"))
+ table.insert(paths, path.join(logical_drive, "Program Files", "Microsoft Visual Studio", vsvers[version], "*", "VC", "Auxiliary", "Build"))
+ table.insert(paths, path.join(logical_drive, "Program Files", "Microsoft Visual Studio " .. version, "VC"))
end
-- find vcvarsall.bat, vcvars32.bat for vs7.1
- local vcvarsall = find_file("vcvarsall.bat", pathes) or find_file("vcvars32.bat", pathes)
+ local vcvarsall = find_file("vcvarsall.bat", paths) or find_file("vcvars32.bat", paths)
if vcvarsall then
-- load vcvarsall
diff --git a/xmake/modules/lib/detect/pkg_config.lua b/xmake/modules/lib/detect/pkg_config.lua
index a56f7a458..84da9c2f2 100644
--- a/xmake/modules/lib/detect/pkg_config.lua
+++ b/xmake/modules/lib/detect/pkg_config.lua
@@ -33,7 +33,7 @@ import("detect.tools.find_pkg_config")
--
function version(name, opt)
- -- attempt to add search pathes from pkg-config
+ -- attempt to add search paths from pkg-config
local pkg_config = find_pkg_config()
if not pkg_config then
return
@@ -72,7 +72,7 @@ end
--
function variables(name, variables, opt)
- -- attempt to add search pathes from pkg-config
+ -- attempt to add search paths from pkg-config
local pkg_config = find_pkg_config()
if not pkg_config then
return
@@ -124,7 +124,7 @@ end
--
function libinfo(name, opt)
- -- attempt to add search pathes from pkg-config
+ -- attempt to add search paths from pkg-config
local pkg_config = find_pkg_config()
if not pkg_config then
return
diff --git a/xmake/toolchains/msvc/load.lua b/xmake/toolchains/msvc/load.lua
index c338befe7..19e4c4e3a 100644
--- a/xmake/toolchains/msvc/load.lua
+++ b/xmake/toolchains/msvc/load.lua
@@ -55,7 +55,7 @@ function _add_vsenv(toolchain, name)
end
end
- -- get the pathes for the vs environment
+ -- get the paths for the vs environment
local new = vsenv[name]
if new then
toolchain:add("runenvs", name:upper(), path.splitenv(new))