From 9b3cd2462a48ca942309e24f511db2ea1fddc95b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 21 Mar 2016 22:21:02 +0100 Subject: vis: also lookup Lua support files relative to the binary location This simplifies deployment of vis on remote systems without root access. The idea is to extract a statically linked binary together with the lexer syntax files into some directory, adjust $PATH to include it and have everything just work. For now this uses /proc/self/exe and thus only works on Linux based systems. --- GNUmakefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index f6e57d7..4773324 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -147,7 +147,7 @@ local: clean dependencies CFLAGS_TERMKEY= LDFLAGS_TERMKEY=-ltermkey \ CFLAGS_LUA="-DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DLUA_COMPAT_ALL" \ LDFLAGS_LUA="-llua -lm -ldl" - @echo Run with: LD_LIBRARY_PATH=$(DEPS_LIB) VIS_PATH=. ./vis + @echo Run with: LD_LIBRARY_PATH=$(DEPS_LIB) ./vis standalone: clean dependency/sources/install-libmusl PATH=$(DEPS_BIN):$$PATH PKG_CONFIG_PATH= PKG_CONFIG_LIBDIR= $(MAKE) \ @@ -160,6 +160,5 @@ standalone: clean dependency/sources/install-libmusl LDFLAGS_LUA="-llua -lm -ldl" \ CONFIG_ACL=0 CFLAGS_ACL= LDFLAGS_ACL= \ CONFIG_SELINUX=0 CFLAGS_SELINUX= LDFLAGS_SELINUX= - @echo Run with: VIS_PATH=. ./vis .PHONY: standalone dependencies dependencies-full local \ No newline at end of file -- cgit v1.2.3