lua-users home
lua-l archive

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




Am 21.05.2014 13:00, schrieb Thijs Schreijer:


-----Original Message-----
From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
Behalf Of Philipp Janda
Sent: woensdag 21 mei 2014 12:00
To: lua-l@lists.lua.org
Subject: Re: Makefile vs LUA_PATH inconsistency

Am 21.05.2014 10:22 schröbte Ulrich Schmidt:

Am 21.05.2014 10:16, schrieb Thijs Schreijer:

-----Original Message-----
From: lua-l-bounces@lists.lua.org
[mailto:lua-l-bounces@lists.lua.org] On
Behalf Of Luiz Henrique de Figueiredo
Sent: dinsdag 20 mei 2014 13:53
To: Lua mailing list
Subject: Re: Makefile vs LUA_PATH inconsistency

It seems that plain MinGW doesn't have `rm` or `install` executables
(or a `mkdir` that understands `-p`), so you really have to work hard
to make the install target work for MinGW ...

We haven't got any complaints about this but perhaps we should just
remove the mingw target and avoid noise?

So.... there was some opposition to remove the MinGW target. But what
if a separate makefile for MinGW was included (in /etc for example,
similar to the /etc/luavs.bat file for Visual Studio)?

It would allow a specific makefile, working on more Windows
configurations (eg. No 'cp', or 'rm', but their plain Windows
equivalents) without polluting the generic makefile.

Thijs


Why not? :) As long as it works and is easier to maintain, its ok.

That would work for me too (as does the current Makefile), but if we
provide a full-featured Makefile for Windows including an install
target, we really have to define a default directory layout on Windows
(preferably one that works without setting (m)any environment variables
or compiler flags, or that at least has some other advantage over the
alternatives) ...


The current 'luaconf.h' defaults for LUA_PATH and LUA_CPATH, dictate most of this already (unless you change them too).

The defaults currently are (added linebreaks for readability);
LUA_PATH
   !\\lua\\?.lua;
   !\\lua\\?\\init.lua;
   !\\?.lua;
   !\\?\\init.lua;
   .\\?.lua"

LUA_CPATH
   !\\?.dll;
   !\\loadall.dll;
   .\\?.dll

What struck me was that it seems that `.\\?\\init.lua` is missing from LUA_PATH ? or is there a specific reason?

What I don't like is that the CPATH does not allow for a separate folder for the binary modules (even if it just were /lua/, as there is no problem in mixing .dll and .lua files).



Ulrich.


Philipp





Thats why i stated: "roll your own"
Those paths need to be revisited/changed: IMHO ...
- i dont need different locations for lua- and/or dll-modules
- i dont need loadall.dll (historical?)
- i need \?\init.lua

i set up my module search path this way
 1. look for a version depend module (.dll/.lua)
    in ./modules/5.1/.. (for instance)
 2. look for a non version depend module (.lua only)
    in ./modules/
(change the sub directory name as you wish.)

Ulrich.