]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Reflect override of INSTALL_LJLIBD in package.path.
authorMike Pall <mike>
Wed, 14 Aug 2024 22:38:43 +0000 (00:38 +0200)
committerMike Pall <mike>
Wed, 14 Aug 2024 22:38:43 +0000 (00:38 +0200)
Suggested by GitSparTV. #1239

Makefile
src/Makefile
src/luaconf.h

index 6ae2c49de20ec904b0a372d4baf67a565b36e326..cac43c2809480005ca73e83a015bf61dba807768 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@ INSTALL_SHARE= $(DPREFIX)/share
 INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION)
 INSTALL_INC=   $(INSTALL_DEFINC)
 
-INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(MMVERSION)
+export INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(MMVERSION)
 INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
 INSTALL_LMODD= $(INSTALL_SHARE)/lua
 INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER)
index 224d21e70373c76153d54f1937d70adeed8ee963..43238912ab3a542d9162d20dfa924c137bc3364e 100644 (file)
@@ -299,6 +299,9 @@ endif
 ifneq (,$(LMULTILIB))
   TARGET_XCFLAGS+= -DLUA_LMULTILIB=\"$(LMULTILIB)\"
 endif
+ifneq (,$(INSTALL_LJLIBD))
+  TARGET_XCFLAGS+= -DLUA_LJDIR=\"$(INSTALL_LJLIBD)\"
+endif
 
 ##############################################################################
 # Target system detection.
index f47f068024684053e108e3634761ba00048b2093..1cf3a03c5d903f979d182da987d80abc1c5671c2 100644 (file)
@@ -37,7 +37,6 @@
 #endif
 #define LUA_LROOT      "/usr/local"
 #define LUA_LUADIR     "/lua/5.1/"
-#define LUA_LJDIR      "/luajit-2.1/"
 
 #ifdef LUA_ROOT
 #define LUA_JROOT      LUA_ROOT
 #define LUA_RCPATH
 #endif
 
-#define LUA_JPATH      ";" LUA_JROOT "/share" LUA_LJDIR "?.lua"
+#ifndef LUA_LJDIR
+#define LUA_LJDIR      LUA_JROOT "/share/luajit-2.1"
+#endif
+
+#define LUA_JPATH      ";" LUA_LJDIR "/?.lua"
 #define LUA_LLDIR      LUA_LROOT "/share" LUA_LUADIR
 #define LUA_LCDIR      LUA_LROOT "/" LUA_LMULTILIB LUA_LUADIR
 #define LUA_LLPATH     ";" LUA_LLDIR "?.lua;" LUA_LLDIR "?/init.lua"