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
diff options
context:
space:
mode:
authorJason Perkins <starkos@industriousone.com>2011-08-23 00:35:51 +0400
committerJason Perkins <starkos@industriousone.com>2011-08-23 00:35:51 +0400
commite78d5c2a16345b36f92fabccd3efd80742bc21b1 (patch)
tree89e85063611a6f2cdbc4a47e242fbadd526543cb /src/base/bake.lua
parent4963e4d3a67a4cee49b192076962a856e6473801 (diff)
Fixed #3381011: location breaks vpaths
Diffstat (limited to 'src/base/bake.lua')
-rw-r--r--src/base/bake.lua14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/base/bake.lua b/src/base/bake.lua
index fe511cb..77f6192 100644
--- a/src/base/bake.lua
+++ b/src/base/bake.lua
@@ -116,14 +116,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 +152,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