]> 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:

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