Skip to content

Commit

Permalink
Makefile: Fix PREFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
rvaiya committed Sep 20, 2022
1 parent 2740304 commit 5da441b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
.PHONY: all clean install uninstall debug man compose test-harness
DESTDIR=
PREFIX=/usr

VERSION=2.4.2
COMMIT=$(shell git describe --no-match --always --abbrev=7 --dirty)
VKBD=uinput
PREFIX=/usr

CONFIG_DIR=/etc/keyd
SOCKET_PATH=/var/run/keyd.socket
Expand All @@ -18,6 +16,7 @@ CFLAGS:=-DVERSION=\"v$(VERSION)\ \($(COMMIT)\)\" \
-std=c11 \
-DSOCKET_PATH=\"$(SOCKET_PATH)\" \
-DCONFIG_DIR=\"$(CONFIG_DIR)\" \
-DDATA_DIR=\"$(PREFIX)/share/keyd\" \
-D_DEFAULT_SOURCE \
$(CFLAGS)

Expand Down
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static const char *resolve_include_path(const char *path, const char *include_pa
if (!access(resolved_path, F_OK))
return resolved_path;

snprintf(resolved_path, sizeof resolved_path, "/usr/share/keyd/%s", include_path);
snprintf(resolved_path, sizeof resolved_path, DATA_DIR"/%s", include_path);

if (!access(resolved_path, F_OK))
return resolved_path;
Expand Down

0 comments on commit 5da441b

Please sign in to comment.