Build: Convert spaces to tabs
Former-commit-id: e0e4844838f16f006941d7152883cbfa04ea9913 [formerly d65a47fe81387c65a7ae32b9b38ad9a8fc4c2713] Former-commit-id: a97e57d33ba27c7b9f3e97d0ff86736b75211df9
This commit is contained in:
parent
926cbbea98
commit
92f7961056
|
|
@ -11,11 +11,11 @@ function NazaraBuild:Execute()
|
||||||
else
|
else
|
||||||
platformData = {"x32", "x64"}
|
platformData = {"x32", "x64"}
|
||||||
end
|
end
|
||||||
|
|
||||||
if (self.Actions[_ACTION] == nil) then
|
if (self.Actions[_ACTION] == nil) then
|
||||||
local makeLibDir = os.is("windows") and "mingw" or "gmake"
|
local makeLibDir = os.is("windows") and "mingw" or "gmake"
|
||||||
|
|
||||||
if (_OPTIONS["with-extlibs"]) then
|
if (_OPTIONS["with-extlibs"]) then
|
||||||
workspace("NazaraExtlibs")
|
workspace("NazaraExtlibs")
|
||||||
platforms(platformData)
|
platforms(platformData)
|
||||||
|
|
||||||
|
|
@ -68,9 +68,9 @@ function NazaraBuild:Execute()
|
||||||
|
|
||||||
configuration("Release*")
|
configuration("Release*")
|
||||||
flags("NoFramePointer")
|
flags("NoFramePointer")
|
||||||
optimize("Speed")
|
optimize("Speed")
|
||||||
rtti("Off")
|
rtti("Off")
|
||||||
vectorextensions("SSE2")
|
vectorextensions("SSE2")
|
||||||
|
|
||||||
configuration({"Release*", "codeblocks or codelite or gmake or xcode3 or xcode4"})
|
configuration({"Release*", "codeblocks or codelite or gmake or xcode3 or xcode4"})
|
||||||
buildoptions("-mfpmath=sse") -- Utilisation du SSE pour les calculs flottants
|
buildoptions("-mfpmath=sse") -- Utilisation du SSE pour les calculs flottants
|
||||||
|
|
@ -82,7 +82,7 @@ function NazaraBuild:Execute()
|
||||||
configuration("ReleaseStatic")
|
configuration("ReleaseStatic")
|
||||||
targetsuffix("-s")
|
targetsuffix("-s")
|
||||||
|
|
||||||
configuration({"not windows", "codeblocks or codelite or gmake or xcode3 or xcode4"})
|
configuration({"not windows", "codeblocks or codelite or gmake or xcode3 or xcode4"})
|
||||||
buildoptions("-fPIC")
|
buildoptions("-fPIC")
|
||||||
|
|
||||||
configuration("codeblocks or codelite or gmake or xcode3 or xcode4")
|
configuration("codeblocks or codelite or gmake or xcode3 or xcode4")
|
||||||
|
|
@ -90,7 +90,7 @@ function NazaraBuild:Execute()
|
||||||
|
|
||||||
for k, libTable in ipairs(self.OrderedExtLibs) do
|
for k, libTable in ipairs(self.OrderedExtLibs) do
|
||||||
project(libTable.Name)
|
project(libTable.Name)
|
||||||
|
|
||||||
language(libTable.Language)
|
language(libTable.Language)
|
||||||
location(_ACTION .. "/extlibs")
|
location(_ACTION .. "/extlibs")
|
||||||
|
|
||||||
|
|
@ -106,7 +106,7 @@ function NazaraBuild:Execute()
|
||||||
configuration(k)
|
configuration(k)
|
||||||
links(v)
|
links(v)
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration({})
|
configuration({})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -130,10 +130,10 @@ function NazaraBuild:Execute()
|
||||||
flags("Symbols")
|
flags("Symbols")
|
||||||
|
|
||||||
configuration("Release*")
|
configuration("Release*")
|
||||||
flags("NoFramePointer")
|
flags("NoFramePointer")
|
||||||
optimize("Speed")
|
optimize("Speed")
|
||||||
rtti("Off")
|
rtti("Off")
|
||||||
vectorextensions("SSE2")
|
vectorextensions("SSE2")
|
||||||
|
|
||||||
configuration({"Release*", "codeblocks or codelite or gmake or xcode3 or xcode4"})
|
configuration({"Release*", "codeblocks or codelite or gmake or xcode3 or xcode4"})
|
||||||
buildoptions("-mfpmath=sse") -- Utilisation du SSE pour les calculs flottants
|
buildoptions("-mfpmath=sse") -- Utilisation du SSE pour les calculs flottants
|
||||||
|
|
@ -250,17 +250,17 @@ function NazaraBuild:Execute()
|
||||||
configuration(k)
|
configuration(k)
|
||||||
links(v)
|
links(v)
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration({})
|
configuration({})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Tools
|
-- Tools
|
||||||
for k, toolTable in ipairs(self.OrderedTools) do
|
for k, toolTable in ipairs(self.OrderedTools) do
|
||||||
local prefix = "Nazara"
|
local prefix = "Nazara"
|
||||||
if (toolTable.Kind == "plugin") then
|
if (toolTable.Kind == "plugin") then
|
||||||
prefix = "Plugin"
|
prefix = "Plugin"
|
||||||
end
|
end
|
||||||
|
|
||||||
project(prefix .. toolTable.Name)
|
project(prefix .. toolTable.Name)
|
||||||
|
|
||||||
location(_ACTION .. "/tools")
|
location(_ACTION .. "/tools")
|
||||||
|
|
@ -358,7 +358,7 @@ function NazaraBuild:Execute()
|
||||||
|
|
||||||
configuration("*Dynamic")
|
configuration("*Dynamic")
|
||||||
kind("SharedLib")
|
kind("SharedLib")
|
||||||
|
|
||||||
configuration("DebugStatic")
|
configuration("DebugStatic")
|
||||||
targetsuffix("-s-d")
|
targetsuffix("-s-d")
|
||||||
|
|
||||||
|
|
@ -443,7 +443,7 @@ function NazaraBuild:Execute()
|
||||||
configuration(k)
|
configuration(k)
|
||||||
links(v)
|
links(v)
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration({})
|
configuration({})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -497,24 +497,24 @@ function NazaraBuild:Initialize()
|
||||||
ACTION = nil
|
ACTION = nil
|
||||||
|
|
||||||
-- Extern libraries
|
-- Extern libraries
|
||||||
local extlibs = os.matchfiles("../extlibs/build/*.lua")
|
local extlibs = os.matchfiles("../extlibs/build/*.lua")
|
||||||
for k,v in pairs(extlibs) do
|
for k,v in pairs(extlibs) do
|
||||||
local f, err = loadfile(v)
|
local f, err = loadfile(v)
|
||||||
if (f) then
|
if (f) then
|
||||||
LIBRARY = {}
|
LIBRARY = {}
|
||||||
self:SetupInfoTable(LIBRARY)
|
self:SetupInfoTable(LIBRARY)
|
||||||
|
|
||||||
f()
|
f()
|
||||||
|
|
||||||
local succeed, err = self:RegisterExternLibrary(LIBRARY)
|
local succeed, err = self:RegisterExternLibrary(LIBRARY)
|
||||||
if (not succeed) then
|
if (not succeed) then
|
||||||
print("Unable to register extern library: " .. err)
|
print("Unable to register extern library: " .. err)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
print("Unable to load extern library file: " .. err)
|
print("Unable to load extern library file: " .. err)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
LIBRARY = nil
|
LIBRARY = nil
|
||||||
|
|
||||||
-- Then the modules
|
-- Then the modules
|
||||||
local modules = os.matchfiles("scripts/modules/*.lua")
|
local modules = os.matchfiles("scripts/modules/*.lua")
|
||||||
|
|
@ -587,7 +587,7 @@ function NazaraBuild:Initialize()
|
||||||
end
|
end
|
||||||
EXAMPLE = nil
|
EXAMPLE = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Once everything is registred, let's process all the tables
|
-- Once everything is registred, let's process all the tables
|
||||||
self.OrderedExamples = {}
|
self.OrderedExamples = {}
|
||||||
self.OrderedExtLibs = {}
|
self.OrderedExtLibs = {}
|
||||||
|
|
@ -596,19 +596,19 @@ function NazaraBuild:Initialize()
|
||||||
local tables = {self.ExtLibs, self.Modules, self.Tools, self.Examples}
|
local tables = {self.ExtLibs, self.Modules, self.Tools, self.Examples}
|
||||||
local orderedTables = {self.OrderedExtLibs, self.OrderedModules, self.OrderedTools, self.OrderedExamples}
|
local orderedTables = {self.OrderedExtLibs, self.OrderedModules, self.OrderedTools, self.OrderedExamples}
|
||||||
for k,projects in ipairs(tables) do
|
for k,projects in ipairs(tables) do
|
||||||
-- Begin by resolving every project (because of dependencies in the same category)
|
-- Begin by resolving every project (because of dependencies in the same category)
|
||||||
for projectId,projectTable in pairs(projects) do
|
for projectId,projectTable in pairs(projects) do
|
||||||
self:Resolve(projectTable)
|
self:Resolve(projectTable)
|
||||||
end
|
end
|
||||||
|
|
||||||
for projectId,projectTable in pairs(projects) do
|
for projectId,projectTable in pairs(projects) do
|
||||||
if (self:Process(projectTable)) then
|
if (self:Process(projectTable)) then
|
||||||
table.insert(orderedTables[k], projectTable)
|
table.insert(orderedTables[k], projectTable)
|
||||||
else
|
else
|
||||||
print("Rejected " .. projectTable.Name .. " " .. string.lower(projectTable.Type) .. ": " .. projectTable.ExcludeReason)
|
print("Rejected " .. projectTable.Name .. " " .. string.lower(projectTable.Type) .. ": " .. projectTable.ExcludeReason)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
table.sort(orderedTables[k], function (a, b) return a.Name < b.Name end)
|
table.sort(orderedTables[k], function (a, b) return a.Name < b.Name end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -668,13 +668,13 @@ function NazaraBuild:RegisterExample(exampleTable)
|
||||||
if (#exampleTable.Files == 0) then
|
if (#exampleTable.Files == 0) then
|
||||||
return false, "This example has no files"
|
return false, "This example has no files"
|
||||||
end
|
end
|
||||||
|
|
||||||
local files = {}
|
local files = {}
|
||||||
for k, file in ipairs(exampleTable.Files) do
|
for k, file in ipairs(exampleTable.Files) do
|
||||||
table.insert(files, "../examples/" .. exampleTable.Directory .. "/" .. file)
|
table.insert(files, "../examples/" .. exampleTable.Directory .. "/" .. file)
|
||||||
end
|
end
|
||||||
exampleTable.Files = files
|
exampleTable.Files = files
|
||||||
|
|
||||||
exampleTable.Type = "Example"
|
exampleTable.Type = "Example"
|
||||||
self.Examples[lowerCaseName] = exampleTable
|
self.Examples[lowerCaseName] = exampleTable
|
||||||
return true
|
return true
|
||||||
|
|
@ -719,7 +719,7 @@ function NazaraBuild:RegisterModule(moduleTable)
|
||||||
table.insert(moduleTable.Files, "../src/Nazara/" .. moduleTable.Name .. "/**.hpp")
|
table.insert(moduleTable.Files, "../src/Nazara/" .. moduleTable.Name .. "/**.hpp")
|
||||||
table.insert(moduleTable.Files, "../src/Nazara/" .. moduleTable.Name .. "/**.inl")
|
table.insert(moduleTable.Files, "../src/Nazara/" .. moduleTable.Name .. "/**.inl")
|
||||||
table.insert(moduleTable.Files, "../src/Nazara/" .. moduleTable.Name .. "/**.cpp")
|
table.insert(moduleTable.Files, "../src/Nazara/" .. moduleTable.Name .. "/**.cpp")
|
||||||
|
|
||||||
if (_OPTIONS["united"] and lowerCaseName ~= "core") then
|
if (_OPTIONS["united"] and lowerCaseName ~= "core") then
|
||||||
table.insert(moduleTable.FilesExcluded, "../src/Nazara/" .. moduleTable.Name .. "/Debug/NewOverload.cpp")
|
table.insert(moduleTable.FilesExcluded, "../src/Nazara/" .. moduleTable.Name .. "/Debug/NewOverload.cpp")
|
||||||
end
|
end
|
||||||
|
|
@ -767,18 +767,18 @@ local PosixOSes = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function NazaraBuild:Process(infoTable)
|
function NazaraBuild:Process(infoTable)
|
||||||
local libraries = {}
|
local libraries = {}
|
||||||
for k, library in pairs(infoTable.Libraries) do
|
for k, library in pairs(infoTable.Libraries) do
|
||||||
local projectName = library:match("Nazara(%w+)")
|
local projectName = library:match("Nazara(%w+)")
|
||||||
local moduleTable = projectName and self.Modules[projectName:lower()]
|
local moduleTable = projectName and self.Modules[projectName:lower()]
|
||||||
local toolTable = projectName and self.Tools[projectName:lower()]
|
local toolTable = projectName and self.Tools[projectName:lower()]
|
||||||
|
|
||||||
if (moduleTable) then
|
if (moduleTable) then
|
||||||
if (moduleTable.Excluded) then
|
if (moduleTable.Excluded) then
|
||||||
infoTable.Excluded = true
|
infoTable.Excluded = true
|
||||||
infoTable.ExcludeReason = "depends on excluded " .. projectName .. " module"
|
infoTable.ExcludeReason = "depends on excluded " .. projectName .. " module"
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
if (_OPTIONS["united"]) then
|
if (_OPTIONS["united"]) then
|
||||||
library = "NazaraEngine"
|
library = "NazaraEngine"
|
||||||
|
|
@ -795,38 +795,38 @@ function NazaraBuild:Process(infoTable)
|
||||||
else
|
else
|
||||||
local extLibTable = self.ExtLibs[library:lower()]
|
local extLibTable = self.ExtLibs[library:lower()]
|
||||||
if (extLibTable) then
|
if (extLibTable) then
|
||||||
if (extLibTable.Excluded) then
|
if (extLibTable.Excluded) then
|
||||||
infoTable.Excluded = true
|
infoTable.Excluded = true
|
||||||
infoTable.ExcludeReason = "depends on excluded " .. extLibTable.Name .. " external library"
|
infoTable.ExcludeReason = "depends on excluded " .. extLibTable.Name .. " external library"
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
library = extLibTable.Name
|
library = extLibTable.Name
|
||||||
|
|
||||||
table.insert(infoTable.ConfigurationLibraries.DebugStatic, library .. "-s-d")
|
table.insert(infoTable.ConfigurationLibraries.DebugStatic, library .. "-s-d")
|
||||||
table.insert(infoTable.ConfigurationLibraries.ReleaseStatic, library .. "-s")
|
table.insert(infoTable.ConfigurationLibraries.ReleaseStatic, library .. "-s")
|
||||||
table.insert(infoTable.ConfigurationLibraries.DebugDynamic, library .. "-s-d")
|
table.insert(infoTable.ConfigurationLibraries.DebugDynamic, library .. "-s-d")
|
||||||
table.insert(infoTable.ConfigurationLibraries.ReleaseDynamic, library .. "-s")
|
table.insert(infoTable.ConfigurationLibraries.ReleaseDynamic, library .. "-s")
|
||||||
else
|
else
|
||||||
if (toolTable and toolTable.Kind == "library") then
|
if (toolTable and toolTable.Kind == "library") then
|
||||||
if (toolTable.Excluded) then
|
if (toolTable.Excluded) then
|
||||||
infoTable.Excluded = true
|
infoTable.Excluded = true
|
||||||
infoTable.ExcludeReason = "depends on excluded " .. toolTable.Name .. " tool"
|
infoTable.ExcludeReason = "depends on excluded " .. toolTable.Name .. " tool"
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
library = "Nazara" .. toolTable.Name
|
library = "Nazara" .. toolTable.Name
|
||||||
|
|
||||||
-- Import tools includes
|
-- Import tools includes
|
||||||
for k,v in ipairs(toolTable.Includes) do
|
for k,v in ipairs(toolTable.Includes) do
|
||||||
table.insert(infoTable.Includes, v)
|
table.insert(infoTable.Includes, v)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- And libraries
|
-- And libraries
|
||||||
for k, v in pairs(toolTable.Libraries) do
|
for k, v in pairs(toolTable.Libraries) do
|
||||||
table.insert(infoTable.Libraries, v)
|
table.insert(infoTable.Libraries, v)
|
||||||
end
|
end
|
||||||
|
|
||||||
for config, libs in pairs(toolTable.ConfigurationLibraries) do
|
for config, libs in pairs(toolTable.ConfigurationLibraries) do
|
||||||
for k,v in pairs(libs) do
|
for k,v in pairs(libs) do
|
||||||
table.insert(infoTable.ConfigurationLibraries[config], v)
|
table.insert(infoTable.ConfigurationLibraries[config], v)
|
||||||
|
|
@ -876,14 +876,14 @@ function NazaraBuild:Process(infoTable)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function NazaraBuild:Resolve(infoTable)
|
function NazaraBuild:Resolve(infoTable)
|
||||||
if (infoTable.ClientOnly and _OPTIONS["server"]) then
|
if (infoTable.ClientOnly and _OPTIONS["server"]) then
|
||||||
infoTable.Excluded = true
|
infoTable.Excluded = true
|
||||||
infoTable.ExcludeReason = "excluded by command-line options (client-only)"
|
infoTable.ExcludeReason = "excluded by command-line options (client-only)"
|
||||||
end
|
end
|
||||||
|
|
||||||
if (infoTable.Excludable) then
|
if (infoTable.Excludable) then
|
||||||
local optionName = "excludes-" .. string.lower(infoTable.Type .. "-" .. infoTable.Name)
|
local optionName = "excludes-" .. string.lower(infoTable.Type .. "-" .. infoTable.Name)
|
||||||
|
|
@ -891,22 +891,22 @@ function NazaraBuild:Resolve(infoTable)
|
||||||
trigger = optionName,
|
trigger = optionName,
|
||||||
description = "Excludes the " .. infoTable.Name .. " " .. string.lower(infoTable.Type) .. " and projects relying on it"
|
description = "Excludes the " .. infoTable.Name .. " " .. string.lower(infoTable.Type) .. " and projects relying on it"
|
||||||
})
|
})
|
||||||
|
|
||||||
if (_OPTIONS[optionName]) then
|
if (_OPTIONS[optionName]) then
|
||||||
infoTable.Excluded = true
|
infoTable.Excluded = true
|
||||||
infoTable.ExcludeReason = "excluded by command-line options"
|
infoTable.ExcludeReason = "excluded by command-line options"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (type(infoTable.Libraries) == "function") then
|
if (type(infoTable.Libraries) == "function") then
|
||||||
infoTable.Libraries = infoTable.Libraries()
|
infoTable.Libraries = infoTable.Libraries()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function NazaraBuild:MakeCopyAfterBuild(infoTable)
|
function NazaraBuild:MakeCopyAfterBuild(infoTable)
|
||||||
if (PremakeVersion < 50) then
|
if (PremakeVersion < 50) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if (os.is("windows")) then
|
if (os.is("windows")) then
|
||||||
configuration({})
|
configuration({})
|
||||||
|
|
@ -942,7 +942,7 @@ function NazaraBuild:SetupInfoTable(infoTable)
|
||||||
infoTable.ConfigurationLibraries.ReleaseStatic = {}
|
infoTable.ConfigurationLibraries.ReleaseStatic = {}
|
||||||
infoTable.ConfigurationLibraries.DebugDynamic = {}
|
infoTable.ConfigurationLibraries.DebugDynamic = {}
|
||||||
infoTable.ConfigurationLibraries.ReleaseDynamic = {}
|
infoTable.ConfigurationLibraries.ReleaseDynamic = {}
|
||||||
|
|
||||||
local infos = {"Defines", "DynLib", "Files", "FilesExcluded", "Flags", "Includes", "Libraries"}
|
local infos = {"Defines", "DynLib", "Files", "FilesExcluded", "Flags", "Includes", "Libraries"}
|
||||||
for k,v in ipairs(infos) do
|
for k,v in ipairs(infos) do
|
||||||
infoTable[v] = {}
|
infoTable[v] = {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue