summaryrefslogtreecommitdiff
path: root/xmake/core/project/target.lua
diff options
context:
space:
mode:
authorOpportunity <[email protected]>2020-06-30 11:48:32 +0800
committerOpportunity <[email protected]>2020-06-30 11:48:32 +0800
commit58c8e709cc4677ec6fb5fdfcec1958fab6743709 (patch)
treedce1ed26d57764f4fc3e67538106793c3e1e54b2 /xmake/core/project/target.lua
parentf03a57c21313e1f155294c8bad56cc933c71065f (diff)
fix auto complete
Diffstat (limited to 'xmake/core/project/target.lua')
-rw-r--r--xmake/core/project/target.lua34
1 files changed, 19 insertions, 15 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 652ae4758..d7f44c4af 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -881,24 +881,28 @@ function _instance:targetdir()
-- get build directory
targetdir = config.buildir()
+ end
- -- append plat sub-directory
- local plat = self:plat()
- if plat then
- targetdir = path.join(targetdir, plat)
- end
+ if not targetdir then
+ return nil
+ end
- -- append arch sub-directory
- local arch = self:arch()
- if arch then
- targetdir = path.join(targetdir, arch)
- end
+ -- append plat sub-directory
+ local plat = self:plat()
+ if plat then
+ targetdir = path.join(targetdir, plat)
+ end
- -- append mode sub-directory
- local mode = config.get("mode")
- if mode then
- targetdir = path.join(targetdir, mode)
- end
+ -- append arch sub-directory
+ local arch = self:arch()
+ if arch then
+ targetdir = path.join(targetdir, arch)
+ end
+
+ -- append mode sub-directory
+ local mode = config.get("mode")
+ if mode then
+ targetdir = path.join(targetdir, mode)
end
-- ok?