The current lua build system is not very smart and most functions correspond exactly with writing parts of a ninja manifest. It'd be nice not to have to keep various strings in sync and leverage the lua module system a bit more.
I'm thinking something like this to start:
pkg/zlib/gen.lua:
local libz = lib('libz.a', {...})
return {
libz=libz,
}
pkg/pigz/gen.lua:
local zlib = require 'pkg/zlib'
exe('pigz', {'pigz.c', 'yarn.c', 'try.c', zlib.libz})
I'm not sure exactly how cflags for headers should be plumbed through. Needs some more thought.
The current lua build system is not very smart and most functions correspond exactly with writing parts of a ninja manifest. It'd be nice not to have to keep various strings in sync and leverage the lua module system a bit more.
I'm thinking something like this to start:
pkg/zlib/gen.lua:
pkg/pigz/gen.lua:
I'm not sure exactly how cflags for headers should be plumbed through. Needs some more thought.