-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (31 loc) · 971 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
.POSIX:
.SUFFIXES:
.SUFFIXES: .1 .1.scd
VERSION=0.0.0
PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin
SHAREDIR?=$(PREFIX)/share/linkchan
MANDIR?=$(PREFIX)/share/man
VPATH=doc
DOCS := \
linkchanbot.1
all: doc
doc: $(DOCS)
.1.scd.1:
scdoc < $< > $@
clean:
$(RM) $(DOCS)
install: all
mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(SHAREDIR) $(DESTDIR)$(MANDIR)/man1
install -m755 linkchanbot $(DESTDIR)$(BINDIR)/linkchanbot
install -m644 linkchanbot.1 $(DESTDIR)$(MANDIR)/man1/linkchanbot.1
install -m644 sample.config/bot.cfg $(DESTDIR)$(SHAREDIR)/bot.cfg
install -m644 sample.config/alts.json $(DESTDIR)$(SHAREDIR)/alts.json
install -m644 sample.config/services.json $(DESTDIR)$(SHAREDIR)/services.json
uninstall:
$(RM) $(DESTDIR)$(BINDIR)/linkchanbot
$(RM) $(DESTDIR)$(MANDIR)/man1/linkchanbot.1
$(RM) $(DESTDIR)$(SHAREDIR)/bot.cfg
$(RM) $(DESTDIR)$(SHAREDIR)/alts.json
$(RM) $(DESTDIR)$(SHAREDIR)/services.json
.PHONY: all doc clean install uninstall