diff options
author | Mike Pall <mike> | 2024-08-15 00:38:43 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2024-08-15 00:38:43 +0200 |
commit | ae4735f621d89d84758769b76432d2319dda9827 (patch) | |
tree | 1e3d55e2b5a1f8c1892929bdc24cc69fc480285b | |
parent | 6f834087d0553b68b61770c69109894bf3f375ef (diff) | |
download | luajit-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-- | Makefile | 2 | ||||
-rw-r--r-- | src/Makefile | 3 | ||||
-rw-r--r-- | src/luaconf.h | 7 |
3 files changed, 9 insertions, 3 deletions
@@ -41,7 +41,7 @@ INSTALL_SHARE= $(DPREFIX)/share | |||
41 | INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION) | 41 | INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION) |
42 | INSTALL_INC= $(INSTALL_DEFINC) | 42 | INSTALL_INC= $(INSTALL_DEFINC) |
43 | 43 | ||
44 | INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(MMVERSION) | 44 | export INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(MMVERSION) |
45 | INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit | 45 | INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit |
46 | INSTALL_LMODD= $(INSTALL_SHARE)/lua | 46 | INSTALL_LMODD= $(INSTALL_SHARE)/lua |
47 | INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER) | 47 | INSTALL_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 | |||
299 | ifneq (,$(LMULTILIB)) | 299 | ifneq (,$(LMULTILIB)) |
300 | TARGET_XCFLAGS+= -DLUA_LMULTILIB=\"$(LMULTILIB)\" | 300 | TARGET_XCFLAGS+= -DLUA_LMULTILIB=\"$(LMULTILIB)\" |
301 | endif | 301 | endif |
302 | ifneq (,$(INSTALL_LJLIBD)) | ||
303 | TARGET_XCFLAGS+= -DLUA_LJDIR=\"$(INSTALL_LJLIBD)\" | ||
304 | endif | ||
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" |