diff options
author | Ben Walton <bwalton@artsci.utoronto.ca> | 2009-11-13 20:29:39 -0500 |
---|---|---|
committer | Avery Pennarun <apenwarr@gmail.com> | 2009-11-15 12:18:13 -0500 |
commit | 0d31de303f9e8e28cc1649dbf41c1cc635bae2d8 (patch) | |
tree | 0a908421c6f74b5ea5d0d7fc4c5428aeea88d5c7 | |
parent | d8b2c0da177ddfc2bc8d1e47278aa1c240d63034 (diff) | |
download | git-0d31de303f9e8e28cc1649dbf41c1cc635bae2d8.tar.gz |
add installation support to Makefile
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
-rw-r--r-- | Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -1,3 +1,13 @@ +prefix ?= /usr/local +mandir ?= $(prefix)/share/man +gitdir ?= $(shell git --exec-path) + +# this should be set to a 'standard' bsd-type install program +INSTALL ?= install +INSTALL_DATA = $(INSTALL) -c -m 0644 +INSTALL_EXE = $(INSTALL) -c -m 0755 +INSTALL_DIR = $(INSTALL) -c -d -m 0755 + default: @echo "git-subtree doesn't need to be built." @echo "Just copy it somewhere on your PATH, like /usr/local/bin." @@ -5,6 +15,16 @@ default: @echo "Try: make doc" @false +install: install-exe install-doc + +install-exe: git-subtree.sh + $(INSTALL_DIR) $(DESTDIR)/$(gitdir) + $(INSTALL_EXE) $< $(DESTDIR)/$(gitdir)/git-subtree + +install-doc: git-subtree.1 + $(INSTALL_DIR) $(DESTDIR)/$(mandir)/man1/ + $(INSTALL_DATA) $< $(DESTDIR)/$(mandir)/man1/ + doc: git-subtree.1 %.1: %.xml |