summaryrefslogtreecommitdiff
path: root/xmake/scripts/action/_build.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-12-06 00:38:11 +0800
committerruki <[email protected]>2015-12-06 00:38:11 +0800
commitb7a0ed4cd24fbd421715dad7376ae691871ca126 (patch)
treeade15aaefe06cdfad6ee4fb81289c0b0e21f278d /xmake/scripts/action/_build.lua
parent55baf72274c1aeefceb125f49a4da77e1d49bf40 (diff)
auto configure if makefile not exists
Diffstat (limited to 'xmake/scripts/action/_build.lua')
-rw-r--r--xmake/scripts/action/_build.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/xmake/scripts/action/_build.lua b/xmake/scripts/action/_build.lua
index 7fea4be22..4b4b72687 100644
--- a/xmake/scripts/action/_build.lua
+++ b/xmake/scripts/action/_build.lua
@@ -80,6 +80,24 @@ function _build.done()
end
end
+ -- check makefile
+ if not os.isfile(rule.makefile()) then
+
+ -- make the configure file for the given target
+ if not project.makeconf(options.target) then
+ -- error
+ utils.error("make configure failed!")
+ return false
+ end
+
+ -- make makefile
+ if not makefile.make() then
+ -- error
+ utils.error("make makefile failed!")
+ return false
+ end
+ end
+
-- build target for makefile
if not makefile.build(target_name) then
-- error