summaryrefslogtreecommitdiff
path: root/xmake/core/project/rule.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-12-15 00:41:39 +0800
committerruki <[email protected]>2018-12-14 22:09:54 +0800
commit95f46b973794b37ccd62edbcc3bfb010b0f23dcc (patch)
treeabbd878e0e78c0511c7da072ad43b70f03eeea47 /xmake/core/project/rule.lua
parent107f81a48da61d37ecbffac4e2f816b9cfedb21c (diff)
improve interpreter
Diffstat (limited to 'xmake/core/project/rule.lua')
-rw-r--r--xmake/core/project/rule.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/core/project/rule.lua b/xmake/core/project/rule.lua
index 5945d91ca..ac86639a0 100644
--- a/xmake/core/project/rule.lua
+++ b/xmake/core/project/rule.lua
@@ -109,8 +109,14 @@ function rule._load(filepath)
local interp = rule._interpreter()
assert(interp)
+ -- load script
+ local ok, errors = interp:load(filepath)
+ if not ok then
+ return nil, errors
+ end
+
-- load rules
- local results, errors = interp:load(filepath, "rule", true, true)
+ local results, errors = interp:make("rule", true, true)
if not results then
return nil, errors
end