Pass in OpenBSD binary path using preprocessor option

Alternative to hard coding binary path for OpenBSD
This commit is contained in:
dahlbaek 2018-06-19 11:24:41 +02:00
parent dc3e4823a5
commit 52a3e9a84d
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ else ifeq ($(os),Haiku)
LIBS += -lncursesw -lnetwork -lbe LIBS += -lncursesw -lnetwork -lbe
else ifeq ($(os),OpenBSD) else ifeq ($(os),OpenBSD)
LIBS += -lncursesw LIBS += -lncursesw
CPPFLAGS += -I/usr/local/include CPPFLAGS += -D'KAK_BIN_PATH="$(bindir)/kak"' -I/usr/local/include
LDFLAGS += -L/usr/local/lib LDFLAGS += -L/usr/local/lib
else ifneq (,$(findstring CYGWIN,$(os))) else ifneq (,$(findstring CYGWIN,$(os)))
CPPFLAGS += -D_XOPEN_SOURCE=700 CPPFLAGS += -D_XOPEN_SOURCE=700

View File

@ -573,7 +573,7 @@ String get_kak_binary_path()
buffer[res] = '\0'; buffer[res] = '\0';
return buffer; return buffer;
#elif defined(__OpenBSD__) #elif defined(__OpenBSD__)
return "/usr/local/bin/"; return KAK_BIN_PATH;
#else #else
# error "finding executable path is not implemented on this platform" # error "finding executable path is not implemented on this platform"
#endif #endif