forked from git-quick-stats/git-quick-stats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (36 loc) · 940 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
PREFIX ?= /usr/local
_INSTDIR ?= $(DESTDIR)$(PREFIX)
BINDIR ?= $(_INSTDIR)/bin
MANDIR ?= $(_INSTDIR)/share/man
TASK_DONE = echo -e "\n✓ $@ done\n"
SHELL := $(shell which bash)
.PHONY: test
all:
@echo "Usage:"
@echo " make install"
@echo " make reinstall"
@echo " make uninstall"
@echo " make test"
help:
$(MAKE) all
@$(TASK_DONE)
install:
install -d -m 0755 $(BINDIR)
install -m 0755 git-quick-stats $(BINDIR)/git-quick-stats
$(MAKE) man
@$(TASK_DONE)
uninstall:
rm -f $(BINDIR)/git-quick-stats
rm -f $(MANDIR)/man1/git-quick-stats.1
@$(TASK_DONE)
reinstall:
@curl -sO https://raw.githubusercontent.com/arzzen/git-quick-stats/master/git-quick-stats
@curl -sO https://raw.githubusercontent.com/arzzen/git-quick-stats/master/git-quick-stats.1
$(MAKE) install
@$(TASK_DONE)
man:
install -d -m 0755 $(MANDIR)/man1/
install -m 0644 git-quick-stats.1 $(MANDIR)/man1/
test:
tests/commands_test.sh
@$(TASK_DONE)