Bump copyright year.
[gitstats.git] / Makefile
blob9c21cfb6516ee088e6a45ce674250990944d16c8
1 PREFIX=/usr/local
2 BINDIR=$(PREFIX)/bin
3 RESOURCEDIR=$(PREFIX)/share/gitstats
4 RESOURCES=gitstats.css sortable.js *.gif
5 BINARIES=gitstats
6 VERSION=$(shell git describe 2>/dev/null || git rev-parse --short HEAD)
7 SEDVERSION=perl -pi -e 's/VERSION = 0/VERSION = "$(VERSION)"/' --
9 all: help
11 help:
12 @echo "Usage:"
13 @echo
14 @echo "make install # install to ${PREFIX}"
15 @echo "make install PREFIX=~ # install to ~"
16 @echo "make release [VERSION=foo] # make a release tarball"
17 @echo
19 install:
20 install -d $(BINDIR) $(RESOURCEDIR)
21 install -v $(BINARIES) $(BINDIR)
22 install -v -m 644 $(RESOURCES) $(RESOURCEDIR)
23 $(SEDVERSION) $(BINDIR)/gitstats
25 release:
26 @cp gitstats gitstats.tmp
27 @$(SEDVERSION) gitstats.tmp
28 @tar --owner=0 --group=0 --transform 's!^!gitstats/!' --transform 's!gitstats.tmp!gitstats!' -zcf gitstats-$(VERSION).tar.gz gitstats.tmp $(RESOURCES) doc/ Makefile
29 @$(RM) gitstats.tmp
31 man:
32 pod2man --center "User Commands" -r $(shell git rev-parse --short HEAD) doc/gitstats.pod > doc/gitstats.1
34 .PHONY: all help install release