| 1 |
SHELL := /bin/sh |
| 2 |
|
| 3 |
PREFIX ?= /usr/local |
| 4 |
|
| 5 |
.PHONY: all |
| 6 |
all: man |
| 7 |
|
| 8 |
mgitstatus.1: mgitstatus.1.md |
| 9 |
pandoc ./$< -s -t man > $@ |
| 10 |
|
| 11 |
.PHONY: man |
| 12 |
man: mgitstatus.1 |
| 13 |
|
| 14 |
.PHONY: test |
| 15 |
test: |
| 16 |
# SC1117 Backslash is literal in... |
| 17 |
# SC2059 Don't use variables in the printf format string. But we need to or colors won't work |
| 18 |
# SC2012 Use find instead of ls, but we need to extract the user id of the .git dir |
| 19 |
shellcheck -e SC1117,SC2059,SC2012 mgitstatus |
| 20 |
|
| 21 |
.PHONY: install |
| 22 |
install: |
| 23 |
install -d $(DESTDIR)$(PREFIX)/bin |
| •24 |
install -d $(DESTDIR)$(PREFIX)/share/man/man1 |
| 25 |
install -m 755 mgitstatus $(DESTDIR)$(PREFIX)/bin/ |
| •26 |
install mgitstatus.1 $(DESTDIR)$(PREFIX)/share/man/man1/ |