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

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