summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/config.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-18 13:41:23 +0800
committerruki <[email protected]>2015-06-18 13:41:23 +0800
commita2037440e4b4211fc67e602d62ab2d598bfe9fca (patch)
tree2154cd518a51023f90652108a0275b016aca1a03 /xmake/scripts/base/config.lua
parentb29768c25b1eb62b397de5d287e39ed6991c2fd7 (diff)
add cfuncs for target and fix parse argv bug
Diffstat (limited to 'xmake/scripts/base/config.lua')
-rw-r--r--xmake/scripts/base/config.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/scripts/base/config.lua b/xmake/scripts/base/config.lua
index 6b2849564..d03a98c93 100644
--- a/xmake/scripts/base/config.lua
+++ b/xmake/scripts/base/config.lua
@@ -179,6 +179,12 @@ function config.load()
assert(option._MENU)
assert(option._MENU.config)
+ -- the target name
+ local name = options.target or options._DEFAULTS.target
+ if not name then
+ return "no given target name!"
+ end
+
-- does not clean the cached configure?
if not options.clean then
@@ -235,10 +241,6 @@ function config.load()
end
end
- -- the target name
- local name = options.target or options._DEFAULTS.target
- assert(name and type(name) == "string")
-
-- init configs if not exists
if not config._CONFIGS then
-- clear configs and mark as "rebuild"