[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] Bou - a Lua-based Build System
- From: "steve donovan" <steve.j.donovan@...>
- Date: Tue, 5 Feb 2008 15:16:48 +0200
Hi guys,
There has recently been discussion around build frameworks, with
various degrees of religious conviction. I've been playing with my own
take on the problem for a while; formerly known as LuaMake, then (for
a few days) as Lake, and now finally as Bou. Bou means 'build' in
Afrikaans, pronounced rather like 'beau'. (the English language is
runninig out of cool names for projects.)
There is a lot missing, but, release early and release often.
Bou looks for a boufile in the current directory; the simplest
possible boufile is "program 'hello.c'".
You can embed the popular 'deps' format into boufiles:
cpp.defaults = {defines = 'SIMPLE',libs = 'user32'}
cpp.program {'bonzo',rules=[[
cppfile.o: cppfile.cpp cpp/inc.h c/common.h
cfile.o: cfile.c c/inc.h c/common.h
clib.o: c/clib.c c/inc.h
]]}
which results in:
g++ -c -O1 -DNDEBUG -DSIMPLE -Icpp -Ic cppfile.cpp
gcc -c -O1 -DNDEBUG -Ic cfile.c
gcc -c -O1 -DNDEBUG -Ic c/clib.c
g++ cppfile.o cfile.o clib.o -luser32 -o bonzo.exe
My current favourite is this:
target('all','c,lua')
target('c',forall_results('*.c',go))
target('lua',forall_results('*.lua',go))
This builds and runs all the C files in a directory, and then runs all
the Lua files. Nice for testing...
As always, it's all on our favourite self-publishing forum:
http://lua-users.org/wiki/LuaBuildBou
steve d.