Added GSL shell specific search path for modules. - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2011年02月01日 13:04:45 +0100
committerfrancesco-ST <francesco.abbate@st.com>2011年02月01日 13:04:45 +0100
commitbd2c1b886cfe9b69a2f8491e700d00639303f798 (patch)
treed611836e71a8676e750a244f0cb749da405ed490
parent90cd68ed973eeefae9e04b7ced38b0a079618501 (diff)
downloadgsl-shell-bd2c1b886cfe9b69a2f8491e700d00639303f798.tar.gz
Added GSL shell specific search path for modules.
Diffstat
-rw-r--r--Makefile 2
-rw-r--r--lua/src/luaconf.h 26
2 files changed, 26 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ace070ad..47be97b5 100644
--- a/Makefile
+++ b/Makefile
@@ -75,7 +75,7 @@ ifeq ($(strip $(DEBUG)), yes)
endif
C_SRC_FILES += gsl-shell.c
-SUBDIRS_DEFS += -DGSL_SHELL_LUA # -DLUA_ROOT=$(PREFIX)
+SUBDIRS_DEFS += -DGSL_SHELL_LUA -DLUA_ROOT=$(PREFIX)
TARGETS = $(GSL_SHELL)
ifeq ($(strip $(ENABLE_AGG_PLOT)), yes)
diff --git a/lua/src/luaconf.h b/lua/src/luaconf.h
index e2cb2616..6905db77 100644
--- a/lua/src/luaconf.h
+++ b/lua/src/luaconf.h
@@ -8,6 +8,9 @@
#ifndef lconfig_h
#define lconfig_h
+#define QUOTEME_(x) #x
+#define QUOTEME(x) QUOTEME_(x)
+
#include <limits.h>
#include <stddef.h>
@@ -80,6 +83,27 @@
** hierarchy or if you want to install your libraries in
** non-conventional directories.
*/
+#ifdef GSL_SHELL_LUA
+#if defined(_WIN32)
+/*
+** In Windows, any exclamation mark ('!') in the path is replaced by the
+** path of the directory of the executable file of the current process.
+*/
+#define GSL_SHELL_CDIR "!\\"
+#define LUA_PATH_DEFAULT \
+ ".\\?.lua;" GSL_SHELL_CDIR"?.lua;" GSL_SHELL_CDIR"?\\init.lua"
+#define LUA_CPATH_DEFAULT \
+ ".\\?.dll;" GSL_SHELL_CDIR"?.dll;" GSL_SHELL_CDIR"loadall.dll"
+
+#else
+#define LUA_ROOT_Q QUOTEME(LUA_ROOT) "/"
+#define GSL_SHELL_CDIR LUA_ROOT_Q "lib/gsl-shell/"
+#define LUA_PATH_DEFAULT \
+ "./?.lua;" GSL_SHELL_CDIR"?.lua;" GSL_SHELL_CDIR"?/init.lua"
+#define LUA_CPATH_DEFAULT \
+ "./?.so;" GSL_SHELL_CDIR"?.so;" GSL_SHELL_CDIR"loadall.so"
+#endif
+#else
#if defined(_WIN32)
/*
** In Windows, any exclamation mark ('!') in the path is replaced by the
@@ -103,7 +127,7 @@
#define LUA_CPATH_DEFAULT \
"./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so"
#endif
-
+#endif
/*
@@ LUA_DIRSEP is the directory separator (for submodules).
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月18日 11:24:47 +0000

AltStyle によって変換されたページ (->オリジナル) /