From 52a3e9a84d852595f51f117abd1a715da4d4f9e2 Mon Sep 17 00:00:00 2001 From: dahlbaek <30782351+dahlbaek@users.noreply.github.com> Date: Tue, 19 Jun 2018 11:24:41 +0200 Subject: [PATCH] Pass in OpenBSD binary path using preprocessor option Alternative to hard coding binary path for OpenBSD --- src/Makefile | 2 +- src/file.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 6158962b..2329d26d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -55,7 +55,7 @@ else ifeq ($(os),Haiku) LIBS += -lncursesw -lnetwork -lbe else ifeq ($(os),OpenBSD) LIBS += -lncursesw - CPPFLAGS += -I/usr/local/include + CPPFLAGS += -D'KAK_BIN_PATH="$(bindir)/kak"' -I/usr/local/include LDFLAGS += -L/usr/local/lib else ifneq (,$(findstring CYGWIN,$(os))) CPPFLAGS += -D_XOPEN_SOURCE=700 diff --git a/src/file.cc b/src/file.cc index e2a5b58e..8d067d6c 100644 --- a/src/file.cc +++ b/src/file.cc @@ -573,7 +573,7 @@ String get_kak_binary_path() buffer[res] = '\0'; return buffer; #elif defined(__OpenBSD__) - return "/usr/local/bin/"; + return KAK_BIN_PATH; #else # error "finding executable path is not implemented on this platform" #endif