about summary refs log tree commit homepage
path: root/Documentation/GNUmakefile
blob: 783cc82ee70229a0ae16c11d288aabc5783cb648 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org>
# License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
all::

INSTALL = install
POD2MAN = pod2man
-include ../GIT-VERSION-FILE
release := dtas $(VERSION)
POD2MAN_OPTS = -v -r '$(release)' --stderr -d 1994-10-02 -c 'dtas user manual'
pod2man = $(POD2MAN) $(POD2MAN_OPTS)
POD2TEXT = pod2text
POD2TEXT_OPTS = --stderr
pod2text = $(POD2TEXT) $(POD2TEXT_OPTS)

m1 =
m1 += dtas-console
m1 += dtas-cueedit
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
m1 += dtas-archive

m7 =
m7 += dtas-player_protocol
m7 += dtas-player_sink_examples
m7 += dtas-player_effects
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 : %.pod
	$(pod2man) -s 1 $< $@+ && mv $@+ $@

%.7 : %.pod
	$(pod2man) -s 7 $< $@+ && mv $@+ $@

all :: $(mantxt)

mantxt = $(addsuffix .txt, $(m1) $(m7))

%.txt : %.pod
	$(pod2text) $< $@+ && mv $@+ $@

clean::
	$(RM) $(man1) $(man7)
	$(RM) $(addsuffix .txt.gz, $(m1) $(m7))