-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (41 loc) · 1.33 KB
/
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
45
46
47
48
49
50
.SUFFIXES:
SHELL = /bin/sh
prefix ?= /usr/local
bindir = $(prefix)/bin
shrdir = $(prefix)/share
RM = rm -f
INSTALL = install
RONN = ronn --pipe
RONNATTR = --manual="Tmuss Manual" --organization="tmuss 0.2.1"
.PHONY: help
help:
@echo "Usage: make [<options>] [<target>]"
@echo ""
@echo "Options:"
@echo " prefix=<path> Set alternate install/uninstall path"
@echo ""
@echo "Targets:"
@echo " help Display help"
@echo " install Install program"
@echo " man Generate man pages"
@echo " uninstall Uninstall program"
.PHONY: man
man:
$(RONN) --roff $(RONNATTR) doc/tmuss.1.ronn > doc/tmuss.1
$(RONN) --roff $(RONNATTR) doc/tmuss.profile.5.ronn > doc/tmuss.profile.5
.PHONY: install
install:
$(INSTALL) -d -m 0755 $(bindir)
$(INSTALL) -d -m 0755 $(shrdir)/man/man1
$(INSTALL) -d -m 0755 $(shrdir)/man/man5
$(INSTALL) -d -m 0755 $(shrdir)/bash-completion/completions
$(INSTALL) -m 0755 src/tmuss $(bindir)
$(INSTALL) -m 0644 doc/tmuss.1 $(shrdir)/man/man1/tmuss.1
$(INSTALL) -m 0644 doc/tmuss.profile.5 $(shrdir)/man/man5/tmuss.profile.5
$(INSTALL) -m 0644 contrib/tmuss-completion.bash $(shrdir)/bash-completion/completions/tmuss
.PHONY: uninstall
uninstall:
$(RM) $(bindir)/tmuss
$(RM) $(shrdir)/man/man1/tmuss.1
$(RM) $(shrdir)/man/man5/tmuss.profile.5
$(RM) $(shrdir)/bash-completion/completions/tmuss