Added automatic way of generating a list of modules and adding it to the kernel

This commit is contained in:
Izaya 2017-04-21 05:26:39 +10:00
parent cc2ae518e2
commit 14580f7ce1
2 changed files with 8 additions and 0 deletions

View File

@ -1,4 +1,5 @@
optimise no optimise no
listmods no
test no test no
log no log no
opath kernel.lua opath kernel.lua

View File

@ -66,6 +66,13 @@ print(tostring(#tm).." modules loaded.\n")
-- Generate source -- Generate source
print("Generating source") print("Generating source")
if cfg.listmods == "yes" then
ss=ss.."modules={"
for k,v in ipairs(tm) do
ss=ss..'"'..v..'",'
end
ss=ss.."}\n"
end
for k,v in pairs(ts) do for k,v in pairs(ts) do
ss=ss..v ss=ss..v
io.write(".") io.write(".")