Fix a nasty dependency bug where filenamesof() on installables wouldn't
return any of the installable files (which meant installables were never considered as dependencies).
This commit is contained in:
parent
f9c77fca03
commit
c6292642c6
1 changed files with 18 additions and 1 deletions
|
@ -18,6 +18,16 @@ local cwd = "."
|
||||||
local vars = {}
|
local vars = {}
|
||||||
local parente = {}
|
local parente = {}
|
||||||
|
|
||||||
|
local function print(...)
|
||||||
|
for _, s in ipairs({...}) do
|
||||||
|
if (type(s) ~= "string") then
|
||||||
|
s = tostring(s)
|
||||||
|
end
|
||||||
|
io.stderr:write(s)
|
||||||
|
end
|
||||||
|
io.stderr:write("\n")
|
||||||
|
end
|
||||||
|
|
||||||
local function concat(...)
|
local function concat(...)
|
||||||
local r = {}
|
local r = {}
|
||||||
for k, t in ipairs({...}) do
|
for k, t in ipairs({...}) do
|
||||||
|
@ -459,7 +469,9 @@ local function definerule(rulename, types, cb)
|
||||||
parente = oldparente
|
parente = oldparente
|
||||||
|
|
||||||
result.is = result.is or {}
|
result.is = result.is or {}
|
||||||
result.is[rulename] = true
|
if rulename then
|
||||||
|
result.is[rulename] = true
|
||||||
|
end
|
||||||
result.fullname = args.fullname
|
result.fullname = args.fullname
|
||||||
|
|
||||||
if targets[arg.fullname] and (targets[arg.fullname] ~= result) then
|
if targets[arg.fullname] and (targets[arg.fullname] ~= result) then
|
||||||
|
@ -623,6 +635,10 @@ definerule("installable",
|
||||||
emitter:exec(commands)
|
emitter:exec(commands)
|
||||||
end
|
end
|
||||||
emitter:endrule()
|
emitter:endrule()
|
||||||
|
|
||||||
|
return {
|
||||||
|
outs = dests
|
||||||
|
}
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -691,6 +707,7 @@ globals = {
|
||||||
fpairs = fpairs,
|
fpairs = fpairs,
|
||||||
include = loadbuildfile,
|
include = loadbuildfile,
|
||||||
inherit = inherit,
|
inherit = inherit,
|
||||||
|
print = print,
|
||||||
replace = replace,
|
replace = replace,
|
||||||
selectof = selectof,
|
selectof = selectof,
|
||||||
startswith = startswith,
|
startswith = startswith,
|
||||||
|
|
Loading…
Reference in a new issue