3 RESOURCEDIR
=$(PREFIX
)/share
/gitstats
4 RESOURCES
=gitstats.css sortable.js
*.gif
6 VERSION
=$(shell git describe
2>/dev
/null || git rev-parse
--short HEAD
)
7 SEDVERSION
=perl
-pi
-e
's/VERSION = 0/VERSION = "$(VERSION)"/' --
14 @echo
"make install # install to ${PREFIX}"
15 @echo
"make install PREFIX=~ # install to ~"
16 @echo
"make release [VERSION=foo] # make a release tarball"
20 install -d
$(BINDIR
) $(RESOURCEDIR
)
21 install -v
$(BINARIES
) $(BINDIR
)
22 install -v
-m
644 $(RESOURCES
) $(RESOURCEDIR
)
23 $(SEDVERSION
) $(BINDIR
)/gitstats
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
32 pod2man
--center
"User Commands" -r
$(shell git rev-parse
--short HEAD
) doc
/gitstats.pod
> doc
/gitstats
.1
34 .PHONY
: all help
install release