lua-users home
lua-l archive

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


Hi,

Asko Kauppi wrote:
> I was hoping to put these onto the Wiki, but there's no useful (and 
> secure) way to place files in there?

What about luaforge? (now that it's back)

> [lua51.info]
> CompileScript: <<
>  echo "" >> src/luaconf.h
>  echo "#undef LUA_PATH_DEFAULT" >> src/luaconf.h
>  echo '#define LUA_PATH_DEFAULT "./?.lua;%p/share/lua/5.1/?.lua;%p/share/lua/5.1/?/init.lua;%p/share/lua/?.lua;%p/share/lua/?/init.lua"' >> src/luaconf.h

Well I'm not so fond of a cross-version shared directory.
I bet this will lead to more confusion. It's already hard enough
to properly install Lua modules in a portable fashion without
resorting to massive guesswork (in the form of a lengthy configure
script).

Why not just redefine LUA_ROOT? This was my intention when I proposed
the nested defines at the start of luaconf.h. And it would cover
LUA_CPATH_DEFAULT, too.

Note: Yes, this works fine -- CPP does lazy evaluation:

$ echo '#define A 1\n#define B A\n#undef A\n#define A 2\nB' | cc -E -P -
2

> InstallScript: <<
>  mkdir -p %i/share/lua
>  mkdir -p %i/share/lua/5.1

The C module directories (lib instead of share) should be created, too.

Bye,
     Mike