diff options
| author | ruki <waruqi@gmail.com> | 2019-06-13 22:34:33 +0800 |
|---|---|---|
| committer | ruki <waruqi@gmail.com> | 2019-06-13 09:27:24 +0800 |
| commit | 0ed40bfdb640b6b663eb7a68199a9985d64546c7 (patch) | |
| tree | db05c14971be9a5b128be500c127f0e47564ff55 | |
| parent | c86f6ddb6ae68f9673f85efd8218e358e7a7fb2e (diff) | |
| download | xmake-docs-0ed40bfdb640b6b663eb7a68199a9985d64546c7.tar.gz xmake-docs-0ed40bfdb640b6b663eb7a68199a9985d64546c7.zip | |
add xx_link
| -rw-r--r-- | manual.md | 42 | ||||
| -rw-r--r-- | zh/manual.md | 42 |
2 files changed, 84 insertions, 0 deletions
@@ -851,6 +851,7 @@ target("test2") | [add_imports](#targetadd_imports) | Add imported modules for the custom script | >= 2.1.7 | | [add_rules](#targetadd_rules) | Add custom compilation rule to target | >= 2.1.9 | | [on_load](#targeton_load) | Run custom load target configuartion script | >= 2.1.5 | +| [on_link](#targeton_link) | Run custom link target script | >= 2.2.7 | | [on_build](#targeton_build) | Run custom build target script | >= 2.0.1 | | [on_build_file](#targeton_build_file) | Run custom build single file script | >= 2.2.3 | | [on_build_files](#targeton_build_files) | Run custom build files script | >= 2.2.3 | @@ -859,6 +860,7 @@ target("test2") | [on_install](#targeton_install) | Run custom install target file script | >= 2.0.1 | | [on_uninstall](#targeton_uninstall) | Run custom uninstall target file script | >= 2.0.1 | | [on_run](#targeton_run) | Run custom run target script | >= 2.0.1 | +| [before_link](#targetbefore_link) | Run custom script before linking target | >= 2.2.7 | | [before_build](#targetbefore_build) | Run custom script before building target | >= 2.0.1 | | [before_build_file](#targetbefore_build_file) | Run custom script before building single file | >= 2.2.3 | | [before_build_files](#targetbefore_build_files) | Run custom script before building files | >= 2.2.3 | @@ -867,6 +869,7 @@ target("test2") | [before_install](#targetbefore_install) | Run custom script before installing target | >= 2.0.1 | | [before_uninstall](#targetbefore_uninstall) | Run custom script before uninstalling target | >= 2.0.1 | | [before_run](#targetbefore_run) | Run custom script before running target | >= 2.0.1 | +| [after_link](#targetafter_link) | Run custom script after linking target | >= 2.2.7 | | [after_build](#targetafter_build) | Run custom script after building target | >= 2.0.1 | | [after_build_file](#targetafter_build_file) | Run custom script after building single file | >= 2.2.3 | | [after_build_files](#targetafter_build_files) | Run custom script after building files | >= 2.2.3 | @@ -1430,6 +1433,19 @@ target("test") You can dynamically add various target attributes in `on_load` via `target:set`, `target:add`. +##### target:on_link + +###### Run custom link target script + +This is a new interface after v2.2.7, which is used to customize the link process of the target. + +```lua +target("test") + on_link(function (target) + print("link it") + end) +``` + ##### target:on_build ###### Run custom build target script @@ -1633,6 +1649,19 @@ target("test") end) ``` +##### target:before_link + +###### Run custom script before linking target + +This is a new interface after v2.2.7 to add custom script before linking target. + +```lua +target("test") + before_link(function (target) + print("") + end) +``` + ##### target:before_build ###### Run custom script before building target @@ -1740,6 +1769,19 @@ target("test") end) ``` +##### target:after_link + +###### Run custom script after linking target + +This is a new interface after v2.2.7 to add custom script after linking target. + +```lua +target("test") + after_link(function (target) + print("") + end) +``` + ##### target:after_build ###### Run custom script after building target diff --git a/zh/manual.md b/zh/manual.md index 9865dc21..a9652fe9 100644 --- a/zh/manual.md +++ b/zh/manual.md @@ -879,6 +879,7 @@ target("test2") | [add_imports](#targetadd_imports) | 为所有自定义脚本预先导入扩展模块 | >= 2.1.7 | | [add_rules](#targetadd_rules) | 添加规则到目标 | >= 2.1.9 | | [on_load](#targeton_load) | 自定义目标加载脚本 | >= 2.1.5 | +| [on_link](#targeton_link) | 自定义链接脚本 | >= 2.2.7 | | [on_build](#targeton_build) | 自定义编译脚本 | >= 2.0.1 | | [on_build_file](#targeton_build_file) | 自定义编译脚本, 实现单文件构建 | >= 2.2.3 | | [on_build_files](#targeton_build_files) | 自定义编译脚本, 实现多文件构建 | >= 2.2.3 | @@ -887,6 +888,7 @@ target("test2") | [on_install](#targeton_install) | 自定义安装脚本 | >= 2.0.1 | | [on_uninstall](#targeton_uninstall) | 自定义卸载脚本 | >= 2.0.1 | | [on_run](#targeton_run) | 自定义运行脚本 | >= 2.0.1 | +| [before_link](#targetbefore_link) | 在链接之前执行一些自定义脚本 | >= 2.2.7 | | [before_build](#targetbefore_build) | 在构建之前执行一些自定义脚本 | >= 2.0.1 | | [before_build_file](#targetbefore_build_file) | 自定义编译前的脚本, 实现单文件构建 | >= 2.2.3 | | [before_build_files](#targetbefore_build_files) | 自定义编译前的脚本, 实现多文件构建 | >= 2.2.3 | @@ -895,6 +897,7 @@ target("test2") | [before_install](#targetbefore_install) | 在安装之前执行一些自定义脚本 | >= 2.0.1 | | [before_uninstall](#targetbefore_uninstall) | 在卸载之前执行一些自定义脚本 | >= 2.0.1 | | [before_run](#targetbefore_run) | 在运行之前执行一些自定义脚本 | >= 2.0.1 | +| [after_link](#targetafter_link) | 在链接之后执行一些自定义脚本 | >= 2.2.7 | | [after_build](#targetafter_build) | 在构建之后执行一些自定义脚本 | >= 2.0.1 | | [after_build_file](#targetafter_build_file) | 自定义编译后的脚本, 实现单文件构建 | >= 2.2.3 | | [after_build_files](#targetafter_build_files) | 自定义编译后的脚本, 实现多文件构建 | >= 2.2.3 | @@ -1456,6 +1459,19 @@ target("test") 可以在`on_load`里面,通过`target:set`, `target:add` 来动态添加各种target属性。 +##### target:on_link + +###### 自定义链接脚本 + +这个是在v2.2.7之后新加的接口,用于定制化处理target的链接过程。 + +```lua +target("test") + on_link(function (target) + print("link it") + end) +``` + ##### target:on_build ###### 自定义编译脚本 @@ -1660,6 +1676,19 @@ target("test") end) ``` +##### target:before_link + +###### 在链接之前执行一些自定义脚本 + +这个是在v2.2.7之后新加的接口,用于在链接之前增加一些自定义的操作。 + +```lua +target("test") + before_link(function (target) + print("") + end) +``` + ##### target:before_build ###### 在构建之前执行一些自定义脚本 @@ -1766,6 +1795,19 @@ target("test") end) ``` +##### target:after_link + +###### 在链接之后执行一些自定义脚本 + +这个是在v2.2.7之后新加的接口,用于在链接之后增加一些自定义的操作。 + +```lua +target("test") + after_link(function (target) + print("") + end) +``` + ##### target:after_build ###### 在构建之后执行一些自定义脚本 |
