aboutsummaryrefslogtreecommitdiffstats
path: root/mk/build-doc.mk
blob: 5fb301e3e73b7d617f1666e37b466c266c4a2c05 (plain) (blame)
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
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.  This file is offered as-is,
# without any warranty.


.PHONY: doc
doc: info pdf ps dvi

.PHONY: info pdf ps dvi
info: bin/mds.info
pdf: bin/mds.pdf
ps: bin/mds.ps
dvi: bin/mds.dvi


obj/logo.svg: doc/logo.svg
	@mkdir -p obj
	cp $< $@

obj/logo.pdf: doc/logo.svg
	@mkdir -p obj
	rsvg-convert --format=pdf $< > $@

obj/logo.eps: obj/logo.ps
	ps2eps $<

obj/logo.ps: doc/logo.svg
	@mkdir -p obj
	rsvg-convert --format=ps $< > $@


bin/%.info $(foreach P,$(INFOPARTS),bin/%.info-$(P)): doc/info/%.texinfo doc/info/*.texinfo
	@mkdir -p bin
	$(MAKEINFO) $(TEXIFLAGS) $<
	mv $*.info $*.info-* bin

bin/%.pdf: doc/info/%.texinfo doc/info/*.texinfo # obj/logo.pdf
	@! test -d obj/pdf || rm -rf obj/pdf
	@mkdir -p obj/pdf bin
	cd obj/pdf && texi2pdf $(TEXIFLAGS) ../../$< < /dev/null
	mv obj/pdf/$*.pdf $@

bin/%.dvi: doc/info/%.texinfo doc/info/*.texinfo # obj/logo.eps
	@! test -d obj/dvi || rm -rf obj/dvi
	@mkdir -p obj/dvi bin
	cd obj/dvi && $(TEXI2DVI) $(TEXIFLAGS) ../../$< < /dev/null
	mv obj/dvi/$*.dvi $@

bin/%.ps: doc/info/%.texinfo doc/info/*.texinfo # obj/logo.eps
	@! test -d obj/ps || rm -rf obj/ps
	@mkdir -p obj/ps bin
	cd obj/ps && texi2pdf $(TEXIFLAGS) --ps ../../$< < /dev/null
	mv obj/ps/$*.ps $@