summaryrefslogtreecommitdiff
path: root/xmake/core/project/rule.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-04-12 00:28:09 +0800
committerruki <[email protected]>2018-04-11 20:48:54 +0800
commit6a5bfcf9fd370a6f69ddeb49dacde279e8c2d45e (patch)
tree39e2efad2db0bcc309d48bba1bce34cce9b7433b /xmake/core/project/rule.lua
parentb0196c2cc8d91c1db21442488ff44e64336bfa7c (diff)
build rule files
Diffstat (limited to 'xmake/core/project/rule.lua')
-rw-r--r--xmake/core/project/rule.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/xmake/core/project/rule.lua b/xmake/core/project/rule.lua
index 7539b79a3..83d116cfc 100644
--- a/xmake/core/project/rule.lua
+++ b/xmake/core/project/rule.lua
@@ -236,19 +236,19 @@ function rule:orderdeps()
end
-- build source files
-function rule:build(target, sourcefiles)
+function rule:build_files(target, sourcefiles)
- -- build all?
- local build_all = self:script("build_files")
- if build_all then
- return sandbox.load(build_all, target, sourcefiles)
+ -- build files?
+ local build_files = self:script("build_files")
+ if build_files then
+ return sandbox.load(build_files, target, sourcefiles)
else
- local build = self:script("build_file")
- if not build then
- return false, string.format("rule(%s): build script not found!", self:name())
+ local build_file = self:script("build_file")
+ if not build_file then
+ return false, string.format("rule(%s): on_build_file() script not found!", self:name())
end
for _, sourcefile in ipairs(table.wrap(sourcefiles)) do
- local ok, errors = sandbox.load(build, target, sourcefile)
+ local ok, errors = sandbox.load(build_file, target, sourcefile)
if not ok then
return false, errors
end