lua-users home
lua-l archive

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


On Mon, Oct 27, 2008 at 1:27 AM, Heesob Park <phasis@gmail.com> wrote:
> Is there any module for automating makefile generation?

Check on luaforge, but I've never seen one used. Its kindof clunky,
but lua projects just seem to come with simple makefiles. The
philosophy seems to be, agree with it or not, that lua is mostly used
as a script core embedded into larger projects - and that you will use
that larger projects build system.

> How to get the lib and include directory name of the current Lua
> install environment with Lua script?

You might be able to process the package.path and cpath to deduce
where the default install locations should be:

% lua -e 'print(package.path)'
./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.1/?/init.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua
% lua -e 'print(package.cpath)'
./?.so;/usr/local/lib/lua/5.1/?.so;/usr/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so

Sam