lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Am 01.10.2013 09:21 schröbte steve donovan:
On Tue, Oct 1, 2013 at 8:39 AM, Philipp Janda <siffiejoe@gmx.net> wrote:
another one. What we need (IMHO) is a script (as portable and easy to
install as possible) that uses the information in a rockspec and the meta
build tool embedded in LuaRocks, and spits out a directory hierarchy of dlls
and lua files suitable for manual installation/embedding/packaging.

That sounds very doable.  Key concept is 'portable and easy'.
Especially if we restrict ourselves to the built-in backend -
unfortunately, there are all these damn makefiles (which Peter rightly
identifies as useless for cross-platform)

LuaRocks has platform-overrides, so the existence of a makefile doesn't necessarily mean that the rock is non-portable. E.g. I have a rockspec that uses `builtin` on Windows, and a makefile on Unix (because I need the output of `apr-config` there). If you bind a library that works for Unix only, there is no reason not to use Make/Autotools in your rockspec.

whereas I suspect the
majority of them could be replaced by built-in rules.  However, that's
a lot of rockspecs to hijack - remember they all have maintainers.

That's the same type of problem, the LuaDist guys are facing: The original binding creator has chosen a certain build tool that works for his/her choice of platforms, and the rockspec maintainer now can either use the (possibly well-tested) build script of the binding author, or port this build script to a more portable format (`builtin`-rockspec or CMake file). Bindings are usually much smaller than the libraries they bind, so if we can't get it right with `builtin`-rockspecs, you can probably imagine why I don't have much faith in an approach like LuaDist ...


If you can convince most Lua developers to use Lake instead of autotools,
make, cmake, shell scripts, and/or <insert obscure tool here>: Bravo, that
will make things easier!

I don't hold out much hope, really.  I personally find it very useful,
of course, but it's unlkely to get any traction.  But we have the
output of these tools...a little installer is not that complicated.

There hasn't been much progress in general adoption of a standard build tool since Make (and that one relies heavily on external programs), so I don't hold my breath either. That's why I like the "meta-build-tool" approach of LuaRocks.


Scaling of LuaDist?  Well, through heroic effort Peter has grown it
(much of his work is reverse-engineering the build rules and turning
them into CMake files).

That is no small feat for sure, but heroism is a limited resource. Sooner or later every project will have to work with an "average" maintainer ...


steve d.


Philipp