summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-07-01 00:54:07 +0800
committerruki <[email protected]>2020-06-30 23:24:45 +0800
commit632953a98bfc82aabcb7752b46ed4d90e4537d45 (patch)
treed934229a52793a9ff82f0006fdfeda5880d67a39
parentcb6d357208b2db9516aaa0046bca751e51b32ec2 (diff)
fix codestyle
-rw-r--r--xmake/core/project/target.lua2
-rw-r--r--xmake/modules/private/utils/complete_helper.lua18
2 files changed, 7 insertions, 13 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index fc73acd25..302f7cff8 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -895,8 +895,6 @@ function _instance:targetdir()
if mode then
targetdir = path.join(targetdir, mode)
end
-
- -- ok?
return targetdir
end
diff --git a/xmake/modules/private/utils/complete_helper.lua b/xmake/modules/private/utils/complete_helper.lua
index 4e8c38e8f..7a8f36585 100644
--- a/xmake/modules/private/utils/complete_helper.lua
+++ b/xmake/modules/private/utils/complete_helper.lua
@@ -18,31 +18,27 @@
-- @file complete_helper.lua
--
+-- imports
+import("core.project.project")
+import("core.project.config")
+
+-- get targets
function targets()
return try
{
function ()
- import("core.project.project")
- import("core.project.config")
-
- -- load config
config.load()
-
return table.keys(project.targets())
end
}
end
+-- get runnable targets
function runable_targets()
return try
{
function ()
- import("core.project.project")
- import("core.project.config")
-
- -- load config
config.load()
-
local targets = project.targets()
local runable = {}
for k, v in pairs(targets) do
@@ -53,4 +49,4 @@ function runable_targets()
return runable
end
}
-end \ No newline at end of file
+end