diff options
| author | ruki <[email protected]> | 2017-11-11 21:06:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-11-11 21:06:54 +0800 |
| commit | d8c3db4f8bd8a63eb1748bf1e0fd90001e318668 (patch) | |
| tree | 96c1d3c5d7e1070b517661366432d31c29f684f6 /xmake/actions/package/main.lua | |
| parent | bc63208869cc865be6ce6ec60d22c9d128d9d65e (diff) | |
impl other rules
Diffstat (limited to 'xmake/actions/package/main.lua')
| -rw-r--r-- | xmake/actions/package/main.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/xmake/actions/package/main.lua b/xmake/actions/package/main.lua index 17c51526a..7c20d46ca 100644 --- a/xmake/actions/package/main.lua +++ b/xmake/actions/package/main.lua @@ -25,8 +25,9 @@ -- imports import("core.base.option") import("core.base.task") -import("core.project.config") import("core.base.global") +import("core.project.rule") +import("core.project.config") import("core.project.project") import("core.platform.platform") @@ -113,7 +114,7 @@ option("[targetname]") end -- package target -function _on_package_target(target) +function _on_package(target) -- is phony target? if target:isphony() then @@ -136,6 +137,13 @@ function _on_package_target(target) -- package it scripts[kind](target) + + -- package files with the custom + for sourcekind, sourcebatch in pairs(target:sourcebatches()) do + if sourcebatch.rulename then + rule.package(sourcebatch.rulename, target, sourcebatch.sourcefiles) + end + end end -- package the given target @@ -148,7 +156,7 @@ function _package(target) local scripts = { target:script("package_before") - , target:script("package", _on_package_target) + , target:script("package", _on_package) , target:script("package_after") } |
