diff options
| author | ruki <[email protected]> | 2019-08-03 20:57:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-08-03 20:57:35 +0800 |
| commit | 3bcd6b12a6230e1bb421b67d58cfc5fe057db8dc (patch) | |
| tree | 4161c2994140693fc748048db987a4e876af5d7b | |
| parent | e3bda5c006d6e35eb029844be29942451849247d (diff) | |
add add_cleanfiles api
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | xmake/actions/clean/main.lua | 3 | ||||
| -rw-r--r-- | xmake/core/project/target.lua | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 666165972..05b3ac348 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * [#487](https://github.com/xmake-io/xmake/issues/487): Support to build the selected files for the given target * Add filelock for io * [#513](https://github.com/xmake-io/xmake/issues/513): Support for android/termux +* [#517](https://github.com/xmake-io/xmake/issues/517): Add `add_cleanfiles` api for target ### Changes @@ -624,6 +625,7 @@ * [#487](https://github.com/xmake-io/xmake/issues/487): 通过`xmake --files="src/*.c"`支持指定一批文件进行编译。 * 针对io模块增加文件锁接口 * [#513](https://github.com/xmake-io/xmake/issues/513): 增加对android/termux终端的支持,可在android设备上执行xmake来构建项目 +* [#517](https://github.com/xmake-io/xmake/issues/517): 为target增加`add_cleanfiles`接口,实现快速定制化清理文件 ### 改进 diff --git a/xmake/actions/clean/main.lua b/xmake/actions/clean/main.lua index d2c9b5969..b2479a868 100644 --- a/xmake/actions/clean/main.lua +++ b/xmake/actions/clean/main.lua @@ -50,6 +50,9 @@ function _do_clean_target(target) local _, dstheaders = target:headers() remove_files(dstheaders) + -- remove the clean files + remove_files(target:get("cleanfiles")) + -- remove all? if option.get("all") then diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 7c336944c..8011ff313 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -1689,6 +1689,7 @@ function target.apis() , "target.set_rundir" -- target.add_xxx , "target.add_files" + , "target.add_cleanfiles" , "target.add_configfiles" , "target.add_installfiles" -- target.del_xxx |
