summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile42
1 files changed, 30 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 329d8b9..8f9a5db 100644
--- a/Makefile
+++ b/Makefile
@@ -6,27 +6,39 @@ MANDIR ?= $(PREFIX)/share/man
PLATFORMFILE := src/platform/$(shell uname | cut -d _ -f 1 | tr '[:upper:]' '[:lower:]').sh
+ifeq ($(FORCE_BASHCOMP),1)
+BASHCOMP_SWITCH := "-D"
+else
+BASHCOMP_SWITCH :=
+endif
+ifeq ($(FORCE_ZSHCOMP),1)
+ZSHCOMP_SWITCH := "-D"
+else
+ZSHCOMP_SWITCH :=
+endif
+ifeq ($(FORCE_FISHCOMP),1)
+FISHCOMP_SWITCH := "-D"
+else
+FISHCOMP_SWITCH :=
+endif
+
.PHONY: install uninstall install-common
all:
@echo "Password store is a shell script, so there is nothing to do. Try \"make install\" instead."
install-common:
- @mkdir -p "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(LIBDIR)" "$(DESTDIR)$(MANDIR)/man1" "$(DESTDIR)$(PREFIX)/share/bash-completion/completions/"
- @install -m 0644 -v man/pass.1 "$(DESTDIR)$(MANDIR)/man1/pass.1"
- @install -m 0644 -v src/completion/pass.bash-completion "$(DESTDIR)$(PREFIX)/share/bash-completion/completions/pass"
-
-# Uncomment to install the zsh completion file.
-# @install -m 0644 -v src/completion/pass.zsh-completion "$(DESTDIR)$(PREFIX)/share/zsh/site-functions/_pass"
-#
-# Uncomment to install the fish completion file.
-# @install -m 0644 -v src/completion/pass.fish-completion "$(DESTDIR)$(PREFIX)/share/fish/completions/pass.fish"
+ @install -m 0644 -v -D man/pass.1 "$(DESTDIR)$(MANDIR)/man1/pass.1"
+
+ @install -m 0644 -v $(BASHCOMP_SWITCH) src/completion/pass.bash-completion "$(DESTDIR)$(PREFIX)/share/bash-completion/completions/pass" 2>/dev/null || echo "** Bash completion file skipped. **"
+ @install -m 0644 -v $(ZSHCOMP_SWITCH) src/completion/pass.zsh-completion "$(DESTDIR)$(PREFIX)/share/zsh/site-functions/_pass" 2>/dev/null || echo "** Zsh completion file skipped. **"
+ @install -m 0644 -v $(FISHCOMP_SWITCH) src/completion/pass.fish-completion "$(DESTDIR)$(PREFIX)/share/fish/completions/pass.fish" 2>/dev/null || echo "** Fish completion file skipped. **"
ifneq ($(strip $(wildcard $(PLATFORMFILE))),)
install: install-common
- @install -m 0644 -v "$(PLATFORMFILE)" "$(DESTDIR)$(LIBDIR)/password-store.platform.sh"
+ @install -m 0644 -v -D "$(PLATFORMFILE)" "$(DESTDIR)$(LIBDIR)/password-store/platform.sh"
@mkdir -p -v "$(DESTDIR)$(BINDIR)/"
- sed 's:.*PLATFORM_FUNCTION_FILE.*:source "$(DESTDIR)$(LIBDIR)/password-store.platform.sh":' src/password-store.sh > "$(DESTDIR)$(BINDIR)/pass"
+ sed 's:.*PLATFORM_FUNCTION_FILE.*:source "$(DESTDIR)$(LIBDIR)/password-store/platform.sh":' src/password-store.sh > "$(DESTDIR)$(BINDIR)/pass"
@chmod 0755 "$(DESTDIR)$(BINDIR)/pass"
else
install: install-common
@@ -36,4 +48,10 @@ install: install-common
endif
uninstall:
- @rm -vf "$(DESTDIR)$(BINDIR)/pass" "$(DESTDIR)$(MANDIR)/man1/pass.1" "$(DESTDIR)$(PREFIX)/share/bash-completion/completions/pass" "$(DESTDIR)$(LIBDIR)/password-store.platform.sh"
+ @rm -vrf \
+ "$(DESTDIR)$(BINDIR)/pass" \
+ "$(DESTDIR)$(LIBDIR)/password-store/" \
+ "$(DESTDIR)$(MANDIR)/man1/pass.1" \
+ "$(DESTDIR)$(PREFIX)/share/bash-completion/completions/pass" \
+ "$(DESTDIR)$(PREFIX)/share/zsh/site-functions/_pass" \
+ "$(DESTDIR)$(PREFIX)/share/fish/completions/pass.fish"
+0100'>2018-02-08generate: disallow zero length generated passwordsJason A. Donenfeld1-1/+2 2018-02-01generate: in-place should work when file is emptyJason A. Donenfeld1-1/+1 2017-12-18Quote array specifierJason A. Donenfeld1-1/+1 2017-10-13protect dirname calls from pass-names that look like command-line optionsStacey Sheldon1-6/+6 2017-09-15passmenu: Don't eat whitespace at beginning/end of passwordDaniel Lublin1-1/+1 2017-08-29emacs: Release version 1.0.1 of Emacs packageSvend Sorensen2-5/+10 2017-08-29emacs: --run-async: Quote shell argumentsDamien Cassou1-4/+5 2017-08-29emacs: Update author's email addressSvend Sorensen1-2/+2 2017-08-29emacs: Fix package-lint violationsSvend Sorensen1-2/+3 2017-07-26emacs: Release version 1.0.0 of Emacs packageSvend Sorensen2-1/+8 2017-07-26emacs: Use with-editor to wrap "pass edit"Svend Sorensen2-9/+17 2017-04-13Bump version1.7.1Jason A. Donenfeld1-1/+1 2017-04-13init: match only the public keyJason A. Donenfeld1-1/+1 2017-03-28Use $GPG variableJason A. Donenfeld1-3/+3 2017-03-20Fix compatibility with GnuPG 2.2.19Andreas Stieger2-2/+2 2017-03-01tests: fix on OSX by not using the tr hackJason A. Donenfeld3-5/+2 2017-02-26Bump version1.7Jason A. Donenfeld1-1/+1 2017-02-26Modernize makefileJason A. Donenfeld2-31/+36 2017-02-25CopyrightJason A. Donenfeld1-1/+1 2017-02-25StyleJason A. Donenfeld1-2/+2 2017-02-25git: use inner-most directoryJason A. Donenfeld2-27/+48 2017-02-25clip: sleep may require argv[0] to be sleepJason A. Donenfeld1-1/+1 2017-02-25man: document system extensionsJason A. Donenfeld1-2/+3