lua-users home
lua-l archive

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


On Wed, Sep 25, 2013 at 12:05 PM, Hisham <h@hisham.hm> wrote:
> On 25 September 2013 12:31, Javier Guerra Giraldez <javier@guerrag.com> wrote:
>> On Wed, Sep 25, 2013 at 10:17 AM, Hisham <h@hisham.hm> wrote:
> I don't get it. "configure; make; make install" is acceptable but the
> above file that specifies the same thing is "_not_ clear enough"? Both
> do not say "how many binary files it makes, how are named, if there's
> any module hierarchy, so on."; why is one acceptable and the other
> isn't?


you're right, it is (almost) the same thing; but we're already forced
to accept  "configure; make; make install" for other (non-Lua)
projects.  it's _far_ from desirable, but it's common.

i know, it's totally unfair, since LuaRocks is much better.

but unfortunately, it's unrealistic to bug _all_ projects on this.

Lua projects, on the other hand, are much easier to manually install,
so it _is_ reasonable to ask for instructions to do so.


>
> Unlike your acceptable option A, the rockspec also specifies
> installation dependencies and tells precisely which configure flags
> need to be edited in order to suit your system.
>
>>  sometimes i don't do "make install" immediately;
>> after "make" i try to check what would happen on install.  not really
>> easy, but i consider it's my own choice to do the hard way.
>
> For that very same reason, LuaRocks runs "make" and "make install" in
> a sandbox directory.

that's a big improvement, but remember we're talking about when the
user can't or don't want to use LuaRocks.  as Shmuel put it, LuaRocks
shouldn't be a requirement.


>> B: "make, then put bump.lua and the "mole" directory on your Lua path,
>> and the binary modules foo, bar and blech in your CPATH"
>>
>> this is _much_ better, since i know what goes where even before downloading.
>
> Well, different strokes for different folks, but lots of people prefer
> automated procedures rather than a list of instructions in English of
> things to be done by hand, as can be witnessed by the popularity of
> tools such as make, apt-get, etc.

totally right.  but still, the existence an automated procedure
shouldn't be any impediment to those of us that choose not to use it.


> Anyway, a rockspec-to-English script isn't hard to write. Here's one,
> for fun, in pre-alpha quality, tested on half-dozen rockspecs :) (no
> LuaRocks required!)
>
> https://gist.github.com/hishamhm/6702614

this is really nice!   I'd encourage all projects to include that
output on a file visible in the published repository.



> To build:
>    ./configure LUA='$(LUA)' LUA_INCLUDE='-I$(LUA_INCDIR)'
> --prefix='$(PREFIX)' --libdir='$(LIBDIR)' --datadir='$(LUADIR)' &&
> make clean all
> where
>    * $(LUADIR) is where you want to install zile's Lua modules
>    * $(LUA_INCDIR) is where your Lua headers live
>    * $(LUA) is your Lua interpreter
>    * $(LIBDIR) is where you want to install zile's C modules
>    * $(PREFIX) is where you want to install zile
>
> To install:
>    make install luadir='$(LUADIR)'
> where
>    * $(LUADIR) is where you want to install zile's Lua modules


.... and this is the only shortcoming i see: there's no way to know
which files would be installed.   that's what I still ask project
owners: include the list of files that have to be copied to
package.path and package.cpath




tl,dr;  please, show the list of files that have to be copied to
package.path and package.cpath in the installation instructions.

-- 
Javier