commit f3f7af50a0c97aa224bb009d308d5a1027c1ff66
parent 64661dffbf8f285f76fcc9e4c11e21b1c2429e69
Author: Chris Down <chris@chrisdown.name>
Date: Mon, 3 Aug 2020 11:40:15 +0100
Merge pull request #135 from Mic92/makefile
Makefile: install into PREFIX
Diffstat:
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,14 +1,12 @@
# `dmenu` is not a hard dependency, but you need it unless
# you plan to set CM_LAUNCHER to another value like `rofi`
REQUIRED_BINS := xsel clipnotify
+PREFIX ?= /usr
$(foreach bin,$(REQUIRED_BINS),\
$(if $(shell command -v $(bin) 2> /dev/null),$(info Found `$(bin)`),$(error Missing Dep. Please install `$(bin)`)))
.PHONY: install
install:
- install -D -m755 clipmenu /usr/bin/clipmenu
- install -D -m755 clipmenud /usr/bin/clipmenud
- install -D -m755 clipdel /usr/bin/clipdel
- install -D -m755 clipctl /usr/bin/clipctl
- install -D -m644 init/clipmenud.service /usr/lib/systemd/user/clipmenud.service
+ install --target "${PREFIX}/bin" -D -m755 clipmenu clipmenud clipdel clipctl
+ install -D -m644 init/clipmenud.service "${PREFIX}/lib/systemd/user/clipmenud.service"