X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/e56288b8270a948db0f6fecc17f0e7fcaea5ac6c..094c9de21caa66d6fa1ffe5700954fa2087f497c:/Makefile?ds=sidebyside diff --git a/Makefile b/Makefile index 429ecd6..ca6ebe6 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ -PREFIX=/usr -DOCDIR=$(PREFIX)/share/doc/$(self) +PREFIX?=/usr +DOCDIR_PREFIX=$(PREFIX)/share/doc +DOCDIR=$(DOCDIR_PREFIX)/$(self) ZSHDIR=$(PREFIX)/share/zsh/vendor-completions RONN ?= ronn @@ -39,11 +40,11 @@ uninstall: purge: uninstall rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(PREFIX)/bin/ rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(PREFIX)/share/man/man1/ - rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(shell dirname $(DOCDIR)) + rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(DOCDIR_PREFIX) rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(ZSHDIR) test: - if which git > /dev/null ; then :; else echo "'git' not found, exiting..."; exit 1; fi + @if which git > /dev/null ; then :; else echo "'git' not found, exiting..."; exit 1; fi moo: - @if [ -x /usr/games/cowsay ]; then /usr/games/cowsay "I hope you're happy now..."; fi + @ which cowsay >/dev/null 2>&1 && cowsay "I hope you're happy now..."