Am 01.09.2014 um 22:50 schröbte Hisham: > On 28 August 2014 06:23, Philipp Janda <[email protected]> wrote: >> >> It's LIBDIR that you want. Install there and let LuaRocks handle the >> rest (i.e. copy the installed files to the usual locations). This way it >> can keep track of what has been installed by this rock. > > Oops, I mixed it up in my example.
I rest my case. ;-) > > Any suggestions? I guess changing all LUADIR to SHAREDIR would make > more sense (on Unix at least), but I can't think of any better changes > than that. Then we'd have: Personally, I wouldn't name a variable by some sub-component of some default path on one OS. I'd use the purpose of the variable for naming it, so my current favorites are `LMODDIR` (where Lua modules are installed) and `CMODDIR` (where C modules are installed). I also thought about something mimicking the `LUA_PATH`/`LUA_CPATH` distinction (`LUA_PATH_DIR`?), so that anyone who knows `package.path`/`package.cpath` would immediately get it, but sadly `PATH` is too generic so the names would be longer (and include underscores; ATM all target directory variables don't have underscores). And of course we have the familiar `LUA_LDIR` and `LUA_CDIR` from `luaconf.h` (although I don't like the `LUA_` prefix) ... > > LIBDIR = where your rock's lib/lua/5.x files are installed That could still be mixed up with `LUA_LIBDIR`. I'd try to avoid suffixes (or prefixes) of other variables. > SHAREDIR = where your rock's share/lua/5.x files are installed Too Unix-centric for my taste. > > then for each external dependency Foo: > FOO_DIR = base prefix for Foo > FOO_LIBDIR = where Foo's lib/ files are installed (location of > libfoo.so, e.g., /usr/lib) > FOO_INCDIR = where Foo's include/ files are installed (location of > foo.h, e.g., /usr/include) > FOO_SHAREDIR = where Foo's share/ files are installed (e.g. /usr/share) Do we have those (`*_SHAREDIR`) at the moment? > > and similarly > LUA_DIR = base prefix for Lua (e.g. /usr/local) > LUA_LIBDIR = where Lua's lib/ files (i.e., liblua.so) are installed > (e.g. /usr/local/lib) > LUA_INCDIR = where Lua's include/ files (i.e., lua.h) are installed > (e.g. /usr/local/include) > LUA_SHAREDIR = where Lua's share/ files are installed (it actually > doesn't have any) > > At least it would do away with LUA_DIR vs. LUADIR. Actually, I would make all `x_DIR` variables write-only: They are convenient for setting include/library directories in one go if those conform to the usual platform conventions, but if you specify `x_INCDIR` and `x_LIBDIR` separately, there might not even be a common prefix for `x_DIR`. I also think that `PREFIX` is too generic. Maybe `ROCKDIR`? > > Obviously we'd have to keep the old ones around for compatibility... > > -- Hisham > Philipp ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Luarocks-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/luarocks-developers
