From 9a0ffb9ab101d95627eeb4b88511ccf16338b729 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 17 Nov 2018 23:02:39 +0800 Subject: modify build file api --- manual.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'manual.md') diff --git a/manual.md b/manual.md index 1fdb0203..15a7d15e 100644 --- a/manual.md +++ b/manual.md @@ -4002,7 +4002,7 @@ add_files("xmlhelper.cpp", {rule = "win.sdk.dotnet"}) ```lua rule("markdown") set_extensions(".md", ".markdown") - on_build_file(function (target, sourcefile) + on_build_file(function (target, sourcefile, opt) os.cp(sourcefile, path.join(target:targetdir(), path.basename(sourcefile) .. ".html")) end) ``` @@ -4023,7 +4023,7 @@ rule("markdown") -- 定义一个markdown文件的构建规则 rule("markdown") set_extensions(".md", ".markdown") - on_build_file(function (target, sourcefile) + on_build_file(function (target, sourcefile, opt) os.cp(sourcefile, path.join(target:targetdir(), path.basename(sourcefile) .. ".html")) end) @@ -4125,9 +4125,9 @@ rule("markdown") ```lua rule("markdown") - on_build_files(function (target, sourcefiles) + on_build_files(function (target, sourcebatch, opt) -- build some source files - for _, sourcefile in ipairs(sourcefiles) do + for _, sourcefile in ipairs(sourcebatch.sourcefiles) do -- ... end end) -- cgit v1.2.3