-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
36 lines (32 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
PROG ?= coffin
PROGO ?= open
PROGC ?= close
PROGT ?= timer
PREFIX ?= /usr
DESTDIR ?=
LIBDIR ?= $(PREFIX)/lib
SYSTEM_EXTENSION_DIR ?= $(LIBDIR)/password-store/extensions
BASHCOMPDIR ?= /etc/bash_completion.d
all:
@echo "pass-$(PROG) is a shell script and doesn't need to be compiled"
@echo ""
@echo "To install it, enter \"make install\""
@echo ""
install:
@install -vd "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)" "$(DESTDIR)$(BASHCOMPDIR)"
@install -vm 0755 $(PROG).bash "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROG).bash"
@install -vm 0755 $(PROGO).bash "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROGO).bash"
@install -vm 0755 $(PROGC).bash "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROGC).bash"
@install -vm 0755 $(PROGT).bash "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROGT).bash"
@install -vm 0644 "completion/pass-$(PROG).bash-completion" "$(DESTDIR)$(BASHCOMPDIR)/pass-$(PROG)"
@echo
@echo "pass-$(PROG) has been installed succesfully"
@echo
uninstall:
@rm -vf \
"$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROG).bash" \
"$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROGO).bash" \
"$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROGC).bash" \
"$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROGT).bash" \
"$(DESTDIR)$(BASHCOMPDIR)/pass-$(PROG)"
.PHONY: install uninstall