From: Luca Boccassi <luca.boccassi@xxxxxxxxxxxxx> Just like it's done for udev, use pkg-config to find the directory where to install units to, and use the default as a fallback. Fixes the build on a usrmerge'd system. Signed-off-by: Luca Boccassi <luca.boccassi@xxxxxxxxxxxxx> --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dfe00b0..cc015ea 100644 --- a/Makefile +++ b/Makefile @@ -88,7 +88,10 @@ MAP_PATH = $(MAP_DIR)/$(MAP_FILE) MDMON_DIR = $(RUN_DIR) # place for autoreplace cookies FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots -SYSTEMD_DIR=/lib/systemd/system +SYSTEMD_DIR := $(shell $(PKG_CONFIG) --variable=systemdsystemunitdir systemd 2>/dev/null) +ifndef SYSTEMD_DIR + SYSTEMD_DIR = /lib/systemd/system +endif LIB_DIR=/usr/libexec/mdadm COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC) -- 2.20.1