[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: INSTALL_TOP vs LUA_ROOT
- From: Natanael Copa <natanael.copa@...>
- Date: Wed, 18 Oct 2006 11:43:58 +0200
On Sun, 2006-10-15 at 15:49 -0700, Brian McCallister wrote:
> I have noticed that the library values in the lua Makefile
>
> INSTALL_TOP= /Users/brianm/.opt/lua-5.1.1
> ...
> INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
> INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
>
>
> are not used in the installed lua:
>
> brianm@golem:~/work/lua-5.1.1$ ~/.opt/lua-5.1.1/bin/lua
> Lua 5.1.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio
> > print(package.path)
> ./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/
> init.lua;/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.1/?/init.lua
> >
>
> But that package.path seems to use the LUA_ROOT derived values in
> luaconf.h. Is there a way to change this so that the search path
> matches the install paths?
The attatched patch should let you change you chage the LUA_ROOT (and
LUA_LDIR and LUA_CDIR) with -D
CFLAGS = ..... -DLUA_ROOT=\"$(INSTALL_TOP)\"
>
> -Brian
--- src/luaconf.h.orig 2006-10-18 11:34:44.646338000 +0200
+++ src/luaconf.h 2006-10-18 11:38:53.640338000 +0200
@@ -94,9 +94,19 @@
".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
#else
+
+#ifndef LUA_ROOT
#define LUA_ROOT "/usr/local/"
+#endif
+
+#ifndef LUA_LDIR
#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
+#endif
+
+#ifndef LUA_CDIR
#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
+#endif
+
#define LUA_PATH_DEFAULT \
"./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"