summaryrefslogtreecommitdiff
path: root/xmake/core/project/target.lua
diff options
context:
space:
mode:
authorwtz <[email protected]>2023-07-19 12:35:52 +0800
committerwtz <[email protected]>2023-07-19 12:35:52 +0800
commitf75224a8435d0eb9cdda79f8bc571eeef25a8e33 (patch)
tree278e00b17c8f5558df1c1a21f1204078ea62a58f /xmake/core/project/target.lua
parentca83e9a78b7f2d45e833fa705c880867ad2381c6 (diff)
Fix grammar
Diffstat (limited to 'xmake/core/project/target.lua')
-rw-r--r--xmake/core/project/target.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 3c8c14085..ae3212343 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -273,7 +273,7 @@ end
function _instance:_invalidate(name)
self._CACHEID = self._CACHEID + 1
self._POLICIES = nil
- -- we need flush the source files cache if target/files are modified, e.g. `target:add("files", "xxx.c")`
+ -- we need to flush the source files cache if target/files are modified, e.g. `target:add("files", "xxx.c")`
if name == "files" then
self._SOURCEFILES = nil
elseif name == "deps" then
@@ -1140,7 +1140,7 @@ function _instance:autogenfile(sourcefile, opt)
-- objectfile: project/build/.objs/xxxx/../../xxx.c will be out of range for objectdir
-- autogenfile: project/build/.gens/xxxx/../../xxx.c will be out of range for autogendir
--
- -- we need replace '..' to '__' in this case
+ -- we need to replace '..' with '__' in this case
--
if path.is_absolute(relativedir) and os.host() == "windows" then
-- remove C:\\ and whitespaces and fix long path issue
@@ -1539,7 +1539,7 @@ function _instance:sourcefiles()
pattern = pattern:sub(3)
end
pattern = path.pattern(pattern)
- -- we need match whole pattern, https://github.com/xmake-io/xmake/issues/3523
+ -- we need to match whole pattern, https://github.com/xmake-io/xmake/issues/3523
if sourcefile:match("^" .. pattern .. "$") then
return true
end
@@ -1574,14 +1574,14 @@ function _instance:objectfiles()
local batchcount = 0
local sourcebatches = self:sourcebatches()
local orderkeys = table.keys(sourcebatches)
- table.sort(orderkeys) -- @note we need guarantee the order of objectfiles for depend.is_changed() and etc.
+ table.sort(orderkeys) -- @note we need to guarantee the order of objectfiles for depend.is_changed() and etc.
for _, k in ipairs(orderkeys) do
local sourcebatch = sourcebatches[k]
table.join2(objectfiles, sourcebatch.objectfiles)
batchcount = batchcount + 1
end
- -- some object files may be repeat and appear link errors if multi-batches exists, so we need remove all repeat object files
+ -- some object files may be repeat and appear link errors if multi-batches exists, so we need to remove all repeat object files
-- e.g. add_files("src/*.c", {rules = {"rule1", "rule2"}})
local deduplicate = batchcount > 1
@@ -1810,7 +1810,7 @@ function _instance:dependfile(objectfile)
-- originfile: project/build/.objs/xxxx/../../xxx.c will be out of range for objectdir
--
- -- we need replace '..' to '__' in this case
+ -- we need to replace '..' to '__' in this case
--
relativedir = relativedir:gsub("%.%.", "__")
@@ -2194,7 +2194,7 @@ function _instance:tool(toolkind)
if program and not toolname then
local pos = program:find('@', 1, true)
if pos then
- -- we need ignore valid path with `@`, e.g. /usr/local/opt/[email protected]/bin/go
+ -- we need to ignore valid path with `@`, e.g. /usr/local/opt/[email protected]/bin/go
-- https://github.com/xmake-io/xmake/issues/2853
local prefix = program:sub(1, pos - 1)
if prefix and not prefix:find("[/\\]") then