diff options
author | starkos <none@none> | 2008-12-06 00:18:47 +0300 |
---|---|---|
committer | starkos <none@none> | 2008-12-06 00:18:47 +0300 |
commit | 1c97171f69cd704db6e2aa0f93dec772d0e18792 (patch) | |
tree | 510d0446948106a73896c48f4a893039c23c4186 /src/base/premake.lua | |
parent | bd14e9a2f368cc2ef858669a8431456480ab2990 (diff) |
Big refactoring, bug fixes bug and small, performance improvements (branches/csharp r607:628)
Diffstat (limited to 'src/base/premake.lua')
-rw-r--r-- | src/base/premake.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/base/premake.lua b/src/base/premake.lua index be36af8..31ebbcf 100644 --- a/src/base/premake.lua +++ b/src/base/premake.lua @@ -6,13 +6,12 @@ -- --- Check the specified tools (/cc, /csc, etc.) against the current action +-- Check the specified tools (/cc, /dotnet, etc.) against the current action -- to make sure they are compatible and supported. -- function premake.checktools() local action = premake.actions[_ACTION] - if (not action.valid_tools) then return true end @@ -97,8 +96,13 @@ -- walk the session objects and generate files from the templates local function generatefiles(this, templates) - if (templates) then - for _,tmpl in ipairs(templates) do + if (not templates) then return end + for _,tmpl in ipairs(templates) do + local output = true + if (tmpl[3]) then + output = tmpl[3](this) + end + if (output) then local fname = premake.getoutputname(this, tmpl[1]) local f, err = io.open(fname, "wb") if (not f) then @@ -106,6 +110,7 @@ end io.output(f) + -- call the template function to generate the output tmpl[2](this) io.output():close() |