]> git.madduck.net Git - code/vcsh.git/blob - Makefile

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge branch 'feature/status_against_remote_tracking'
[code/vcsh.git] / Makefile
1 PREFIX?=/usr
2 DOCDIR_PREFIX=$(PREFIX)/share/doc
3 DOCDIR=$(DOCDIR_PREFIX)/$(self)
4 ZSHDIR=$(PREFIX)/share/zsh/vendor-completions
5 RONN ?= ronn
6
7 self=vcsh
8 manpages=$(self).1
9 all=test manpages
10
11 all: $(all)
12
13 install: all
14         install -d $(DESTDIR)$(PREFIX)/bin
15         install -m 0755 $(self) $(DESTDIR)$(PREFIX)/bin
16         install -d $(DESTDIR)$(PREFIX)/share/man/man1
17         install -m 0644 $(manpages) $(DESTDIR)$(PREFIX)/share/man/man1
18         install -d $(DESTDIR)$(DOCDIR)
19         install -m 0644 README.md $(DESTDIR)$(DOCDIR)
20         install -m 0644 doc/hooks $(DESTDIR)$(DOCDIR)
21         install -d $(DESTDIR)$(ZSHDIR)
22         install -m 0644 _$(self) $(DESTDIR)$(ZSHDIR)
23
24 manpages: $(manpages)
25
26 $(self).1: doc/$(self).1.ronn
27         $(RONN) < doc/$(self).1.ronn > $(self).1 || rm $(self).1
28
29 clean:
30         rm -rf $(self).1
31
32 uninstall:
33         rm -rf $(DESTDIR)$(PREFIX)/bin/$(self)
34         rm -rf $(DESTDIR)$(PREFIX)/share/man/man1/$(self).1
35         rm -rf $(DESTDIR)$(DOCDIR)
36         rm -rf $(DESTDIR)$(ZSHDIR)/_$(self)
37
38 # Potentially harmful, used a non-standard option on purpose.
39 # If PREFIX=/usr/local and that's empty...
40 purge: uninstall
41         rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(PREFIX)/bin/
42         rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(PREFIX)/share/man/man1/
43         rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(DOCDIR_PREFIX)
44         rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(ZSHDIR)
45
46 test:
47         @if which git > /dev/null ; then :; else echo "'git' not found, exiting..."; exit 1; fi
48
49 moo:
50         @if [ -x /usr/games/cowsay ]; then /usr/games/cowsay "I hope you're happy now..."; fi