summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorruki <[email protected]>2018-04-18 22:37:43 +0800
committerruki <[email protected]>2018-04-18 09:46:23 +0800
commit383f44f85f2fd209a65d3bc58b28558ce5028051 (patch)
tree71d42a9f065960e13cd67c04165d42adfa89a761 /tests
parent00004a01cd1ed305cbe7f1eaf7b50519464d0b32 (diff)
add before_build_file and after_build_file
Diffstat (limited to 'tests')
-rw-r--r--tests/apis/rules/xmake.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/apis/rules/xmake.lua b/tests/apis/rules/xmake.lua
index b1211e4bd..25640965c 100644
--- a/tests/apis/rules/xmake.lua
+++ b/tests/apis/rules/xmake.lua
@@ -22,6 +22,9 @@ rule("man")
-- define rule: c code
rule("c code")
add_imports("core.tool.compiler")
+ before_build_file(function (target, sourcefile)
+ print("before_build_file: ", sourcefile)
+ end)
on_build_file(function (target, sourcefile)
local objectfile_o = os.tmpfile() .. ".o"
local sourcefile_c = os.tmpfile() .. ".c"
@@ -29,6 +32,9 @@ rule("c code")
compiler.compile(sourcefile_c, objectfile_o)
table.insert(target:objectfiles(), objectfile_o)
end)
+ after_build_file(function (target, sourcefile)
+ print("after_build_file: ", sourcefile)
+ end)
-- define rule: stub3
rule("stub3")