diff --git a/plat/build.lua b/plat/build.lua index 017628abe..a6f9e7a59 100644 --- a/plat/build.lua +++ b/plat/build.lua @@ -48,6 +48,27 @@ definerule("acklibrary", }, function (e) 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 { name = e.name, srcs = e.srcs, @@ -58,10 +79,7 @@ definerule("acklibrary", }, _cfile = ackfile, suffix = em and ".m" or ".o", - commands = { - "rm -f %{outs[1]}", - "ACKDIR=$(INSDIR) $(INSDIR)/bin/aal qc %{outs[1]} %{ins}" - } + commands = commands } end )