aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2024-08-15 00:38:43 +0200
committerMike Pall <mike>2024-08-15 00:38:43 +0200
commitae4735f621d89d84758769b76432d2319dda9827 (patch)
tree1e3d55e2b5a1f8c1892929bdc24cc69fc480285b
parent6f834087d0553b68b61770c69109894bf3f375ef (diff)
downloadluajit-ae4735f621d89d84758769b76432d2319dda9827.tar.gz
luajit-ae4735f621d89d84758769b76432d2319dda9827.tar.bz2
luajit-ae4735f621d89d84758769b76432d2319dda9827.zip
Reflect override of INSTALL_LJLIBD in package.path.
Suggested by GitSparTV. #1239
-rw-r--r--Makefile2
-rw-r--r--src/Makefile3
-rw-r--r--src/luaconf.h7
3 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 6ae2c49d..cac43c28 100644
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@ INSTALL_SHARE= $(DPREFIX)/share
41INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION) 41INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION)
42INSTALL_INC= $(INSTALL_DEFINC) 42INSTALL_INC= $(INSTALL_DEFINC)
43 43
44INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(MMVERSION) 44export INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(MMVERSION)
45INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit 45INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
46INSTALL_LMODD= $(INSTALL_SHARE)/lua 46INSTALL_LMODD= $(INSTALL_SHARE)/lua
47INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER) 47INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER)
diff --git a/src/Makefile b/src/Makefile
index 224d21e7..43238912 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -299,6 +299,9 @@ endif
299ifneq (,$(LMULTILIB)) 299ifneq (,$(LMULTILIB))
300 TARGET_XCFLAGS+= -DLUA_LMULTILIB=\"$(LMULTILIB)\" 300 TARGET_XCFLAGS+= -DLUA_LMULTILIB=\"$(LMULTILIB)\"
301endif 301endif
302ifneq (,$(INSTALL_LJLIBD))
303 TARGET_XCFLAGS+= -DLUA_LJDIR=\"$(INSTALL_LJLIBD)\"
304endif
302 305
303############################################################################## 306##############################################################################
304# Target system detection. 307# Target system detection.
diff --git a/src/luaconf.h b/src/luaconf.h
index f47f0680..1cf3a03c 100644
--- a/src/luaconf.h
+++ b/src/luaconf.h
@@ -37,7 +37,6 @@
37#endif 37#endif
38#define LUA_LROOT "/usr/local" 38#define LUA_LROOT "/usr/local"
39#define LUA_LUADIR "/lua/5.1/" 39#define LUA_LUADIR "/lua/5.1/"
40#define LUA_LJDIR "/luajit-2.1/"
41 40
42#ifdef LUA_ROOT 41#ifdef LUA_ROOT
43#define LUA_JROOT LUA_ROOT 42#define LUA_JROOT LUA_ROOT
@@ -51,7 +50,11 @@
51#define LUA_RCPATH 50#define LUA_RCPATH
52#endif 51#endif
53 52
54#define LUA_JPATH ";" LUA_JROOT "/share" LUA_LJDIR "?.lua" 53#ifndef LUA_LJDIR
54#define LUA_LJDIR LUA_JROOT "/share/luajit-2.1"
55#endif
56
57#define LUA_JPATH ";" LUA_LJDIR "/?.lua"
55#define LUA_LLDIR LUA_LROOT "/share" LUA_LUADIR 58#define LUA_LLDIR LUA_LROOT "/share" LUA_LUADIR
56#define LUA_LCDIR LUA_LROOT "/" LUA_LMULTILIB LUA_LUADIR 59#define LUA_LCDIR LUA_LROOT "/" LUA_LMULTILIB LUA_LUADIR
57#define LUA_LLPATH ";" LUA_LLDIR "?.lua;" LUA_LLDIR "?/init.lua" 60#define LUA_LLPATH ";" LUA_LLDIR "?.lua;" LUA_LLDIR "?/init.lua"