diff --git a/src/_premake_init.lua b/src/_premake_init.lua
index a0e00fc5..31dd4057 100644
--- a/src/_premake_init.lua
+++ b/src/_premake_init.lua
@@ -86,12 +86,6 @@
},
}
- api.register {
- name = "buildmessage",
- scope = "config",
- kind = "string",
- tokens = true,
- }
api.register {
name = "buildcommands",
@@ -102,6 +96,25 @@
api.alias("buildcommands", "buildCommands")
+
+ api.register {
+ name = "buildDependencies",
+ scope = { "rule" },
+ kind = "list:string",
+ tokens = true,
+ }
+
+
+ api.register {
+ name = "buildmessage",
+ scope = { "config", "rule" },
+ kind = "string",
+ tokens = true
+ }
+
+ api.alias("buildmessage", "buildMessage")
+
+
api.register {
name = "buildoptions",
scope = "config",
@@ -109,13 +122,17 @@
tokens = true,
}
+
api.register {
name = "buildoutputs",
- scope = "config",
+ scope = { "config", "rule" },
kind = "list:path",
tokens = true,
}
+ api.alias("buildoutputs", "buildOutputs")
+
+
api.register {
name = "buildrule", -- DEPRECATED
scope = "config",
diff --git a/src/actions/vstudio/vs2010_rules_props.lua b/src/actions/vstudio/vs2010_rules_props.lua
index 89c078d9..19961640 100644
--- a/src/actions/vstudio/vs2010_rules_props.lua
+++ b/src/actions/vstudio/vs2010_rules_props.lua
@@ -83,6 +83,10 @@
m.elements.ruleGroup = function(r)
return {
m.propertyDefaults,
+ m.commandLineTemplates,
+ m.outputs,
+ m.executionDescription,
+ m.additionalDependencies,
}
end
@@ -120,6 +124,13 @@
-- Implementations of individual elements.
---
+ function m.additionalDependencies(r)
+ local deps = table.concat(r.buildDependencies, ";")
+ p.x('%s', deps)
+ end
+
+
+
function m.afterTargets(r)
p.w('<%sAfterTargets>CustomBuild%sAfterTargets>', r.name, r.name)
end
@@ -131,9 +142,35 @@
end
+
+ function m.commandLineTemplates(r)
+ if #r.buildcommands then
+ local cmds = table.concat(r.buildcommands, p.eol())
+ p.x('%s', cmds)
+ end
+ end
+
+
+
function m.dependsOn(r)
p.w('<%sDependsOn', r.name)
p.w(' Condition="\'$(ConfigurationType)\' != \'Makefile\'">_SelectedFiles;$(%sDependsOn)%sDependsOn>',
r.name, r.name, r.name)
end
+
+
+ function m.executionDescription(r)
+ if r.buildmessage then
+ p.x('%s', r.buildmessage)
+ end
+ end
+
+
+
+ function m.outputs(r)
+ if #r.buildoutputs then
+ local outputs = table.concat(r.buildoutputs, ";")
+ p.x('%s', path.translate(outputs))
+ end
+ end