Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorJason Perkins <starkos@industriousone.com>2011-11-13 18:27:27 +0400
committerJason Perkins <starkos@industriousone.com>2011-11-13 18:27:27 +0400
commitfd26375aee5d111037f06ee0a4ba39cda388e9e4 (patch)
treec2626928bcc52f6b61df1cd49959c2a711555b42 /src/base
parentbf1e7ed1e524e895414438c74474f1537550eea5 (diff)
parentcc5dbeb230236023a4d99e8d106081e9ecf5c469 (diff)
Merge latest changes from premake-dev
Diffstat (limited to 'src/base')
-rw-r--r--src/base/api.lua10
-rw-r--r--src/base/bake.lua23
-rw-r--r--src/base/globals.lua6
-rw-r--r--src/base/project.lua14
4 files changed, 46 insertions, 7 deletions
diff --git a/src/base/api.lua b/src/base/api.lua
index cc51321..b47d107 100644
--- a/src/base/api.lua
+++ b/src/base/api.lua
@@ -262,6 +262,12 @@
scope = "container",
},
+ makesettings =
+ {
+ kind = "list",
+ scope = "config",
+ },
+
objdir =
{
kind = "path",
@@ -389,7 +395,7 @@
vpaths =
{
- kind = "keyvalue",
+ kind = "keypath",
scope = "container",
},
@@ -630,7 +636,7 @@
return premake.setdirarray(scope, name, value)
elseif kind == "filelist" then
return premake.setfilearray(scope, name, value)
- elseif kind == "keyvalue" then
+ elseif kind == "keyvalue" or kind == "keypath" then
return premake.setkeyvalue(scope, name, value)
end
end
diff --git a/src/base/bake.lua b/src/base/bake.lua
index fe511cb..9276af8 100644
--- a/src/base/bake.lua
+++ b/src/base/bake.lua
@@ -22,7 +22,14 @@
projects = true,
__configs = true,
}
-
+
+-- do not cascade these fields from projects to configurations
+
+ local nocascade =
+ {
+ makesettings = true,
+ }
+
-- leave these paths as absolute, rather than converting to project relative
local keeprelative =
@@ -116,14 +123,22 @@
--
local function adjustpaths(location, obj)
+ function adjustpathlist(list)
+ for i, p in ipairs(list) do
+ list[i] = path.getrelative(location, p)
+ end
+ end
+
for name, value in pairs(obj) do
local field = premake.fields[name]
if field and value and not keeprelative[name] then
if field.kind == "path" then
obj[name] = path.getrelative(location, value)
elseif field.kind == "dirlist" or field.kind == "filelist" then
- for i, p in ipairs(value) do
- value[i] = path.getrelative(location, p)
+ adjustpathlist(value)
+ elseif field.kind == "keypath" then
+ for k,v in pairs(value) do
+ adjustpathlist(v)
end
end
end
@@ -144,7 +159,7 @@
local function mergefield(kind, dest, src)
local tbl = dest or { }
- if kind == "keyvalue" then
+ if kind == "keyvalue" or kind == "keypath" then
for key, value in pairs(src) do
tbl[key] = mergefield("list", tbl[key], value)
end
diff --git a/src/base/globals.lua b/src/base/globals.lua
index 47966ff..99c8ac7 100644
--- a/src/base/globals.lua
+++ b/src/base/globals.lua
@@ -45,6 +45,12 @@
nosharedlibs = true,
namestyle = "PS3",
},
+ WiiDev =
+ {
+ cfgsuffix = "wii",
+ iscrosscompiler = true,
+ namestyle = "PS3",
+ },
Xbox360 =
{
cfgsuffix = "xbox360",
diff --git a/src/base/project.lua b/src/base/project.lua
index 1f40cde..2fcb0fa 100644
--- a/src/base/project.lua
+++ b/src/base/project.lua
@@ -441,7 +441,10 @@
local kind = cfg.kind
if premake.iscppproject(cfg) then
-- On Windows, shared libraries link against a static import library
- if (namestyle == "windows" or system == "windows") and kind == "SharedLib" and direction == "link" then
+ if (namestyle == "windows" or system == "windows")
+ and kind == "SharedLib" and direction == "link"
+ and not cfg.flags.NoImportLib
+ then
kind = "StaticLib"
end
@@ -619,6 +622,15 @@
--
+-- Returns true if the project use the C language.
+--
+
+ function premake.project.iscproject(prj)
+ return prj.language == "C"
+ end
+
+
+--
-- Returns true if the project uses a C/C++ language.
--