Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f1fe159a1f
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (26 sloc) 0.953 kb
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
RESOURCEDIR=$(PREFIX)/share/gitstats
RESOURCES=gitstats.css sortable.js *.gif
BINARIES=git-stats
VERSION=$(shell git describe 2>/dev/null || git rev-parse --short HEAD)
SEDVERSION=sed -ie 's/VERSION = 0/VERSION = "$(VERSION)"/'
all: help
help:
@echo "Usage:"
@echo
@echo "make install # install to ${PREFIX}"
@echo "make install PREFIX=~ # install to ~"
@echo "make release [VERSION=foo] # make a release tarball"
@echo
install:
install -d $(BINDIR) $(RESOURCEDIR)
install -v $(BINARIES) $(BINDIR)
install -v -m 644 $(RESOURCES) $(RESOURCEDIR)
$(SEDVERSION) $(BINDIR)/git-stats
release:
@cp git-stats git-stats.tmp
@$(SEDVERSION) git-stats.tmp
@tar --owner=0 --group=0 --transform 's!^!gitstats/!' --transform 's!gitstats.tmp!gitstats!' -zcf gitstats-$(VERSION).tar.gz git-stats.tmp $(RESOURCES) doc/ Makefile
@$(RM) git-stats.tmp
.PHONY: all help install release
Jump to Line
Something went wrong with that request. Please try again.