.bam/functions.lua: whitespace fixes.
This commit is contained in:
parent
b564758ff6
commit
ce575cc122
1 changed files with 9 additions and 9 deletions
|
|
@ -3,7 +3,7 @@ local _systems = {
|
||||||
"Win32",
|
"Win32",
|
||||||
-- "Linux"
|
-- "Linux"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-- Returns a string of all supported systems
|
-- Returns a string of all supported systems
|
||||||
function supported_systems()
|
function supported_systems()
|
||||||
|
|
@ -15,11 +15,11 @@ end
|
||||||
function system()
|
function system()
|
||||||
|
|
||||||
local win = os.getenv('OS')
|
local win = os.getenv('OS')
|
||||||
|
|
||||||
if win:lower():match('windows') then
|
if win:lower():match('windows') then
|
||||||
return _systems[1]
|
return _systems[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -35,13 +35,13 @@ function Module(path, src)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Copy a directory src to dst
|
-- Copy a directory src to dst
|
||||||
-- src = "path/to/a", dest = "path/to/b" -> the whole content
|
-- src = "path/to/a", dest = "path/to/b" -> the whole content
|
||||||
-- of "a" will be copied to "path/to/b"
|
-- of "a" will be copied to "path/to/b"
|
||||||
function CopyDir(dst, src)
|
function CopyDir(dst, src)
|
||||||
local r = {}
|
local r = {}
|
||||||
local base = PathDir(src)
|
local base = PathDir(src)
|
||||||
local files = CollectRecursive(Path(src) .. "/*")
|
local files = CollectRecursive(Path(src) .. "/*")
|
||||||
|
|
||||||
for k, v in pairs(files) do
|
for k, v in pairs(files) do
|
||||||
local rdir = PathDir(v:sub(base:len() + 1))
|
local rdir = PathDir(v:sub(base:len() + 1))
|
||||||
r[k] = CopyToDirectory(PathJoin(dst, rdir), v)
|
r[k] = CopyToDirectory(PathJoin(dst, rdir), v)
|
||||||
|
|
@ -55,13 +55,13 @@ end
|
||||||
function BuildExample(settings, name, dependencies)
|
function BuildExample(settings, name, dependencies)
|
||||||
|
|
||||||
Import("examples/" .. name .. "/bam.lua")
|
Import("examples/" .. name .. "/bam.lua")
|
||||||
|
|
||||||
exe = Link(settings, "examples/" .. name, Compile(settings, src))
|
exe = Link(settings, "examples/" .. name, Compile(settings, src))
|
||||||
|
|
||||||
if dependencies ~= nil and #dependencies > 0 then
|
if dependencies ~= nil and #dependencies > 0 then
|
||||||
AddDependency(exe, dependencies)
|
AddDependency(exe, dependencies)
|
||||||
end
|
end
|
||||||
|
|
||||||
return exe
|
return exe
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -74,4 +74,4 @@ function BuildExamples(settings, names, dependencies)
|
||||||
r[i] = BuildExample(settings, names[i], dependencies)
|
r[i] = BuildExample(settings, names[i], dependencies)
|
||||||
end
|
end
|
||||||
return r
|
return r
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue