Create archives in chunks to allow for very long lists of members.

This commit is contained in:
David Given 2022-07-18 00:55:02 +02:00
parent 20c2029753
commit 01c2342e18

View file

@ -48,6 +48,27 @@ definerule("acklibrary",
}, },
function (e) function (e)
local em = (e.vars.plat or ""):find("^em") local em = (e.vars.plat or ""):find("^em")
local commands = {
"rm -f %{outs[1]}",
}
local t = {}
local function flush()
commands[#commands+1] =
"ACKDIR=$(INSDIR) $(INSDIR)/bin/aal qc %{outs[1]} "..
asstring(t)
t = {}
end
for _, target in ipairs(filenamesof(e.srcs)) do
t[#t+1] = target
if #t == 100 then
flush()
end
end
if #t ~= 0 then
flush()
end
return clibrary { return clibrary {
name = e.name, name = e.name,
srcs = e.srcs, srcs = e.srcs,
@ -58,10 +79,7 @@ definerule("acklibrary",
}, },
_cfile = ackfile, _cfile = ackfile,
suffix = em and ".m" or ".o", suffix = em and ".m" or ".o",
commands = { commands = commands
"rm -f %{outs[1]}",
"ACKDIR=$(INSDIR) $(INSDIR)/bin/aal qc %{outs[1]} %{ins}"
}
} }
end end
) )