-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
44 lines (33 loc) · 1.03 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
prefix = /usr/local
exec_prefix = $(prefix)
sbindir = $(exec_prefix)/sbin
datarootdir = $(prefix)/share
mandir = $(datarootdir)/man
INSTALL = install
INSTALL_PROGRAM = $(INSTALL) --mode a+rx,u+w
INSTALL_DIR = $(INSTALL) -d
INSTALL_DATA = $(INSTALL) --mode a+r,u+w
HELP2MAN = help2man
RM = rm
MANSECT=8
PROG=auto6to4
all: $(PROG).$(MANSECT)
$(PROG).$(MANSECT): $(PROG) README
$(HELP2MAN) --no-info --section=$(MANSECT) \
--name="set up IPv6 over IPv4 protocol 41 tunnel" \
--include=README \
--output=- ./$(PROG) \
| sed 's: [-][-]: \\-\\-:' \
| sed 's: [-]: \\-:' \
> $(PROG).$(MANSECT)
install: $(PROG).$(MANSECT)
-$(INSTALL_DIR) $(DESTDIR)$(sbindir)
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/
-$(INSTALL_DIR) $(DESTDIR)$(mandir)/man$(MANSECT)
$(INSTALL_DATA) $(PROG).$(MANSECT) $(DESTDIR)$(mandir)/man$(MANSECT)/
uninstall:
-$(RM) -f $(DESTDIR)$(sbindir)/$(PROG)
-$(RM) -f $(DESTDIR)$(mandir)/man$(MANSECT)/$(PROG).$(MANSECT)
clean:
-rm -f $(PROG).$(MANSECT)
.PHONY: all install uninstall clean