Skip to content

Commit

Permalink
build: general improvements
Browse files Browse the repository at this point in the history
Allow customising the bin and manual page dirs.

Signed-off-by: Paul Wise <[email protected]>
Signed-off-by: Felipe Contreras <[email protected]>
  • Loading branch information
pabs3 authored and felipec committed May 30, 2014
1 parent fadd5f6 commit 3807000
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
prefix := $(HOME)

all:
bindir := $(prefix)/bin
mandir := $(prefix)/share/man/man1

all: doc

doc: doc/git-remote-hg.1

Expand All @@ -10,14 +13,15 @@ test:
doc/git-remote-hg.1: doc/git-remote-hg.txt
a2x -d manpage -f manpage $<

clean:
$(RM) doc/git-remote-hg.1

D = $(DESTDIR)

install:
install -D -m 755 git-remote-hg \
$(D)$(prefix)/bin/git-remote-hg
install: install-doc
install -D -m 755 git-remote-hg $(D)$(bindir)/git-remote-hg

install-doc: doc
install -D -m 644 doc/git-remote-hg.1 \
$(D)$(prefix)/share/man/man1/git-remote-hg.1
install -D -m 644 doc/git-remote-hg.1 $(D)$(mandir)/git-remote-hg.1

.PHONY: all test
.PHONY: all test install install-doc clean

0 comments on commit 3807000

Please sign in to comment.