Skip to content

Commit

Permalink
add installation support to Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
  • Loading branch information
Ben Walton authored and apenwarr committed Nov 15, 2009
1 parent d8b2c0d commit 0d31de3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
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."
@echo
@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
Expand Down

0 comments on commit 0d31de3

Please sign in to comment.