[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Makefile vs LUA_PATH inconsistency
- From: Thijs Schreijer <thijs@...>
- Date: Tue, 20 May 2014 07:49:09 +0000
> -----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 1:57
> To: Lua mailing list
> Subject: Re: Makefile vs LUA_PATH inconsistency
>
> > But it's the inconsistency between luaconf.h and the makefile (default
> behaviors) that I intended to address.
>
> What exactly do you propose to change in the top-level Makefile?
> Changing INSTALL_LMOD and INSTALL_CMOD dos not really work because the
> paths in luaconf.h include the location of lua.exe, which is not known
> at build time and changes dynamically at each invocation.
I'm for keeping the platform differences minimal. So in this case the structure produced by `make install` (though not very windowish) will work fine. I would rather update the default paths in `luaconf.h`.
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
Change it to this;
LUA_PATH
!\\lua\\?.lua;
!\\lua\\?\\init.lua;
!\\?.lua;
!\\?\\init.lua;
!\\..\\share\\lua\\5.2\\?.lua; --> added
!\\..\\share\\lua\\5.2\\?\\init.lua --> added
.\\?.lua"
LUA_CPATH
!\\?.dll;
!\\..\\lib\\lua\\5.2\\?.dll --> added
!\\loadall.dll;
.\\?.dll
Then it includes the locations as produced by the makefile.
What does need to be updated in the toplevel makefile are these lines;
# What to install.
TO_BIN= lua luac
To:
# What to install.
ifeq ($(OS),Windows_NT)
TO_BIN= lua luac lua$(subst .,,$V).dll
else
TO_BIN= lua luac
endif
Because by default the .dll file is missing from an installation. Currently one must manually add `TO_BIN="lua.exe luac.exe lua52.dll"` to the `make install` command.
Thijs