Fill in more easy bits in generated rule .targets
This commit is contained in:
parent
1f1f5bee5f
commit
63927957d6
@ -123,6 +123,7 @@
|
|||||||
return {
|
return {
|
||||||
m.ruleCondition,
|
m.ruleCondition,
|
||||||
m.commandLineTemplate,
|
m.commandLineTemplate,
|
||||||
|
m.properties,
|
||||||
m.ruleInputs,
|
m.ruleInputs,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -163,12 +164,6 @@
|
|||||||
-- Implementations of individual elements.
|
-- Implementations of individual elements.
|
||||||
---
|
---
|
||||||
|
|
||||||
function m.ruleCondition(r)
|
|
||||||
p.w('Condition="\'@(%s)\' != \'\' and \'%%(%s.ExcludedFromBuild)\' != \'true\'"', r.name, r.name)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function m.commandLineTemplate(r)
|
function m.commandLineTemplate(r)
|
||||||
p.w('CommandLineTemplate="%%(%s.CommandLineTemplate)"', r.name)
|
p.w('CommandLineTemplate="%%(%s.CommandLineTemplate)"', r.name)
|
||||||
end
|
end
|
||||||
@ -233,6 +228,16 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function m.properties(r)
|
||||||
|
local defs = r.propertyDefinition
|
||||||
|
for i = 1, #defs do
|
||||||
|
local name = defs[i].name
|
||||||
|
p.w('%s="%%(%s.%s)"', name, r.name, name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function m.propertyPageSchema(r)
|
function m.propertyPageSchema(r)
|
||||||
p.w('<PropertyPageSchema')
|
p.w('<PropertyPageSchema')
|
||||||
p.w(' Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />')
|
p.w(' Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />')
|
||||||
@ -240,6 +245,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function m.ruleCondition(r)
|
||||||
|
p.w('Condition="\'@(%s)\' != \'\' and \'%%(%s.ExcludedFromBuild)\' != \'true\'"', r.name, r.name)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function m.selectedFiles(r)
|
function m.selectedFiles(r)
|
||||||
p.push('<ItemGroup Condition="\'@(SelectedFiles)\' != \'\'">')
|
p.push('<ItemGroup Condition="\'@(SelectedFiles)\' != \'\'">')
|
||||||
p.w('<%s Remove="@(%s)" Condition="\'%%(Identity)\' != \'@(SelectedFiles)\'" />', r.name, r.name)
|
p.w('<%s Remove="@(%s)" Condition="\'%%(Identity)\' != \'@(SelectedFiles)\'" />', r.name, r.name)
|
||||||
@ -255,7 +266,16 @@
|
|||||||
|
|
||||||
|
|
||||||
function m.targetInputs(r)
|
function m.targetInputs(r)
|
||||||
p.w('Inputs="%%(%s.Identity);%%(%s.AdditionalDependencies);$(MSBuildProjectFile)"', r.name, r.name)
|
local extra = {}
|
||||||
|
local defs = r.propertyDefinition
|
||||||
|
for i = 1, #defs do
|
||||||
|
local def = defs[i]
|
||||||
|
if def.dependency then
|
||||||
|
table.insert(extra, string.format("%%(%s.%s);", r.name, def.name))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
extra = table.concat(extra)
|
||||||
|
p.w('Inputs="%%(%s.Identity);%%(%s.AdditionalDependencies);%s$(MSBuildProjectFile)"', r.name, r.name, extra)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user