X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/f924f2b07464b3d6ee5d527ac7f99bf78c9f5f41..056f86ae9a3c25fd2e0b74ac6b81d9b0d5630818:/Makefile?ds=sidebyside diff --git a/Makefile b/Makefile index d62b5cf..b40c618 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ PREFIX=/usr -DOCDIR=$(PREFIX)/share/doc/$(self) +DOCDIR_PREFIX=$(PREFIX)/share/doc +DOCDIR=$(DOCDIR_PREFIX)/$(self) ZSHDIR=$(PREFIX)/share/zsh/vendor-completions +RONN ?= ronn self=vcsh manpages=$(self).1 -all=test manpages +all=test all: $(all) @@ -22,7 +24,7 @@ install: all manpages: $(manpages) $(self).1: doc/$(self).1.ronn - ronn < doc/$(self).1.ronn > $(self).1 + $(RONN) < doc/$(self).1.ronn > $(self).1 || rm $(self).1 clean: rm -rf $(self).1 @@ -38,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