summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-06-05 22:39:54 +0800
committerruki <[email protected]>2018-06-05 09:59:28 +0800
commit46b5924bdda83869b68ce2470ee4d6ab0de83c7a (patch)
treeca13f65bc74058a25410bc99df74eee1248929f9
parent1e235065e5bef8704458c0f2eb6b9ca40231c13b (diff)
remove __rule_ prefix in action
-rw-r--r--xmake/actions/build/kinds/binary.lua14
-rw-r--r--xmake/actions/build/kinds/shared.lua14
-rw-r--r--xmake/actions/build/kinds/static.lua14
3 files changed, 24 insertions, 18 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua
index d9b451cc0..092731449 100644
--- a/xmake/actions/build/kinds/binary.lua
+++ b/xmake/actions/build/kinds/binary.lua
@@ -137,16 +137,18 @@ function build(target, buildinfo)
local sourcekind = nil
local sourcebatch = nil
for kind, batch in pairs(target:sourcebatches()) do
- sourcekind = kind
- sourcebatch = batch
- kindcount = kindcount + 1
- if kindcount > 1 then
- break
+ if not batch.rulename then
+ sourcekind = kind
+ sourcebatch = batch
+ kindcount = kindcount + 1
+ if kindcount > 1 then
+ break
+ end
end
end
-- build target
- if kindcount == 1 and sourcekind and not sourcekind:startswith("__rule_") and compiler.buildmode(sourcekind, "binary:sources", {target = target}) then
+ if kindcount == 1 and compiler.buildmode(sourcekind, "binary:sources", {target = target}) then
_build_from_sources(target, buildinfo, sourcebatch, sourcekind)
else
_build_from_objects(target, buildinfo)
diff --git a/xmake/actions/build/kinds/shared.lua b/xmake/actions/build/kinds/shared.lua
index 9d04589b7..6e9140d13 100644
--- a/xmake/actions/build/kinds/shared.lua
+++ b/xmake/actions/build/kinds/shared.lua
@@ -150,16 +150,18 @@ function build(target, buildinfo)
local sourcekind = nil
local sourcebatch = nil
for kind, batch in pairs(target:sourcebatches()) do
- sourcekind = kind
- sourcebatch = batch
- kindcount = kindcount + 1
- if kindcount > 1 then
- break
+ if not batch.rulename then
+ sourcekind = kind
+ sourcebatch = batch
+ kindcount = kindcount + 1
+ if kindcount > 1 then
+ break
+ end
end
end
-- build target
- if kindcount == 1 and sourcekind and not sourcekind:startswith("__rule_") and compiler.buildmode(sourcekind, "shared:sources", {target = target}) then
+ if kindcount == 1 and compiler.buildmode(sourcekind, "shared:sources", {target = target}) then
_build_from_sources(target, buildinfo, sourcebatch, sourcekind)
else
_build_from_objects(target, buildinfo)
diff --git a/xmake/actions/build/kinds/static.lua b/xmake/actions/build/kinds/static.lua
index 35ee41276..e50be8b78 100644
--- a/xmake/actions/build/kinds/static.lua
+++ b/xmake/actions/build/kinds/static.lua
@@ -145,16 +145,18 @@ function build(target, buildinfo)
local sourcekind = nil
local sourcebatch = nil
for kind, batch in pairs(target:sourcebatches()) do
- sourcekind = kind
- sourcebatch = batch
- kindcount = kindcount + 1
- if kindcount > 1 then
- break
+ if not batch.rulename then
+ sourcekind = kind
+ sourcebatch = batch
+ kindcount = kindcount + 1
+ if kindcount > 1 then
+ break
+ end
end
end
-- build target
- if kindcount == 1 and sourcekind and not sourcekind:startswith("__rule_") and compiler.buildmode(sourcekind, "static:sources", {target = target}) then
+ if kindcount == 1 and compiler.buildmode(sourcekind, "static:sources", {target = target}) then
_build_from_sources(target, buildinfo, sourcebatch, sourcekind)
else
_build_from_objects(target, buildinfo)