about summary refs log tree commit homepage
path: root/Documentation/GNUmakefile
blob: 94c81d5da7c0ee7ca926d5833a1865b35bd1d6ef (plain)
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
all::

PANDOC = pandoc
PANDOC_OPTS = -f markdown --email-obfuscation=none
pandoc = $(PANDOC) $(PANDOC_OPTS)

ones =
ones += dtas-console
ones += dtas-ctl
ones += dtas-enq
ones += dtas-msinkctl
ones += dtas-player
ones += dtas-xdelay
ones += dtas-sinkedit
ones += dtas-sourceedit

man1 := $(addsuffix .1, $(ones))
man7 := $(addsuffix .7,dtas-player_protocol)

all:: man

man: $(man1) $(man7)

prefix?=$(HOME)
mandir?=$(prefix)/share/man
man1dir=$(mandir)/man1
man5dir=$(mandir)/man5
man7dir=$(mandir)/man7

INSTALL = install

gem-man: man
	$(INSTALL) -d -m 755 ../man
	$(INSTALL) -m 644 $(man1) ../man
	$(INSTALL) -m 644 $(man7) ../man

install-man: man
	$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
	$(INSTALL) -d -m 755 $(DESTDIR)$(man7dir)
	$(INSTALL) -m 644 $(man1) $(DESTDIR)$(man1dir)
	$(INSTALL) -m 644 $(man7) $(DESTDIR)$(man7dir)
%.1 %.7 : %.txt
	$(pandoc) -s -t man < $< > $@+ && mv $@+ $@

clean::
	$(RM) $(man1) $(man7)