summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/main.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-05-15 11:57:59 +0800
committerruki <[email protected]>2015-05-15 11:57:59 +0800
commit62456790b7c23a4f471d45d69f65bf4dbdc5aab2 (patch)
treea8f48299c738065567e23f9607e0423c3e852236 /xmake/scripts/base/main.lua
parent418ef668596cb107b75dddee0c4562e4502613cc (diff)
modify xconf format
Diffstat (limited to 'xmake/scripts/base/main.lua')
-rw-r--r--xmake/scripts/base/main.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/xmake/scripts/base/main.lua b/xmake/scripts/base/main.lua
index 3b9f3d57a..4b404a73e 100644
--- a/xmake/scripts/base/main.lua
+++ b/xmake/scripts/base/main.lua
@@ -277,11 +277,12 @@ function main._done_option()
end
assert(options.file)
- -- load xmake.xconf file
- config.loadxconf()
-
- -- load xmake.xproj file
- local _, errors = project.loadxproj(options.file)
+ -- load xmake.xconf file first
+ local errors = config.loadxconf()
+ if not errors then
+ -- load xmake.xproj file
+ errors = project.loadxproj(options.file)
+ end
-- done help
if options.help then
@@ -313,12 +314,12 @@ function main._done_option()
return false
end
- -- save project
- xmake._PROJECT = project
-
-- dump project
project.dump()
+ -- dump config
+ config.dump()
+
-- done action
return action.done(options._ACTION or "build")
end