about summary refs log tree commit homepage
path: root/Documentation/GNUmakefile
blob: 4f44cdc4fc1d8ac52d70b2c31d9fd1934b2f16a3 (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
47
48
49
50
51
52
53
# Copyright (C) 2013-2015 all contributors <dtas-all@nongnu.org>
# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
all::

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

m1 =
m1 += dtas-console
m1 += dtas-ctl
m1 += dtas-enq
m1 += dtas-msinkctl
m1 += dtas-player
m1 += dtas-xdelay
m1 += dtas-sinkedit
m1 += dtas-sourceedit
m1 += dtas-tl
m1 += dtas-splitfx

m7 =
m7 += dtas-player_protocol
m7 += dtas-player_sink_examples
m7 += dtas-env

man1 := $(addsuffix .1, $(m1))
man7 := $(addsuffix .7, $(m7))

all:: man

man: $(man1) $(man7)

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

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)