diff options
author | starkos <none@none> | 2009-08-12 05:16:15 +0400 |
---|---|---|
committer | starkos <none@none> | 2009-08-12 05:16:15 +0400 |
commit | 27d4d615535135cdfe97015cd3d8f88fdc27f449 (patch) | |
tree | fa52333796a4732d349f44e68d93a6e840f2563d /src/actions/make | |
parent | a04f948b60250d26600d29d1b4ee2e07e17a99c3 (diff) |
Began swapping out action templates for onsolution(), onproject() callbacks
Diffstat (limited to 'src/actions/make')
-rw-r--r-- | src/actions/make/_make.lua | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/src/actions/make/_make.lua b/src/actions/make/_make.lua index 29262d8..8dd33eb 100644 --- a/src/actions/make/_make.lua +++ b/src/actions/make/_make.lua @@ -115,23 +115,24 @@ dotnet = { "mono", "msnet", "pnet" }, }, - solutiontemplates = { - { - function(this) return _MAKE.getmakefilename(this, false) end, - premake.make_solution - }, - }, + onsolution = function(sln) + premake.generate(sln, _MAKE.getmakefilename(sln, false), premake.make_solution) + end, - projecttemplates = { - { - function(this) return _MAKE.getmakefilename(this, true) end, - premake.make_cpp, - function(this) return this.language == "C" or this.language == "C++" end - }, - { - function(this) return _MAKE.getmakefilename(this, true) end, - premake.make_csharp, - function(this) return this.language == "C#" end - }, - }, + onproject = function(prj) + local makefile = _MAKE.getmakefilename(prj, true) + if premake.isdotnetproject(prj) then + premake.generate(prj, makefile, premake.make_csharp) + else + premake.generate(prj, makefile, premake.make_cpp) + end + end, + + oncleansolution = function(sln) + premake.clean.file(sln, _MAKE.getmakefilename(sln, false)) + end, + + oncleanproject = function(prj) + premake.clean.file(prj, _MAKE.getmakefilename(prj, true)) + end } |