Lake is a pure Lua cross-platform build system that only requires luafilesystem and directly evaluates build rules. It can be particularly useful if LuaRock's builtin mode is not quite powerful enough, since it can be provided as a build dependency.
For instance, here's a simple one for lhf's latest version of lcomplex.
-- lcomplex-20120430-1.rockspec
package = "lcomplex"
version="20120430-1"
source = {
url = "http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.1/lcomplex.tar.gz",
dir = "complex",
}
description = {
summary = "Support for complex numbers in Lua",
detailed = [[
This code provides support for complex numbers in Lua using the
functions
available in C99.
]],
homepage = "http://penlight.luaforge.net/packages/lcomplex.html",
license = "MIT/X11",
}
dependencies = {
"lake"
}
build = {
type = "command",
build_command = 'lake',
extra_files = { lakefile = [[
c99.shared{'complex',src='lcomplex',needs='lua'}
]]},
platforms = {
unix = {
install = { lib = {
complex = "complex.so"
}}
},
windows = {
install = { lib = {
complex = "complex.dll"
}}
}
}
}
We sneak in a lakefile in using the useful (but undocumented)
build.extra_files table; there's no Lake LuaRocks backend, but Lake is
LuaRocks-aware and asks it for the include directories, etc.
Not really a case that needs the extra power, but if it was a C++ module,
then 'cpp.shared' would do the right thing for both GCC and CL.EXE.
When designing Lake I was always thinking about how it could complement
LuaRocks, so I did not worry too much about teaching it to install modules.
(There's still an issue with build.install.lib where we have to say either
.dll or .so, requiring slightly awkward per-platform overrides)
steve d.
lake-1.4.1-1.rockspec
Description: Binary data
------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________ Luarocks-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/luarocks-developers
