swr: bump minor version.
[ffmpeg.git] / doc / Makefile
1 MANPAGES    = $(PROGS-yes:%=doc/%.1)
2 PODPAGES    = $(PROGS-yes:%=doc/%.pod)
3 HTMLPAGES   = $(PROGS-yes:%=doc/%.html)
4
5 DOCS = $(addprefix doc/, developer.html faq.html general.html libavfilter.html) $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
6
7 all-$(CONFIG_DOC): documentation
8
9 documentation: $(DOCS)
10
11 TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
12
13 doc/%.html: TAG = HTML
14 doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init
15         $(Q)$(TEXIDEP)
16         $(M)texi2html -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
17
18 doc/%.pod: TAG = POD
19 doc/%.pod: doc/%.texi
20         $(Q)$(TEXIDEP)
21         $(M)$(SRC_PATH)/doc/texi2pod.pl $< $@
22
23 doc/%.1: TAG = MAN
24 doc/%.1: doc/%.pod
25         $(M)pod2man --section=1 --center=" " --release=" " $< > $@
26
27 $(DOCS): | doc
28 OBJDIRS += doc
29
30 install-progs-$(CONFIG_DOC): install-man
31
32 install-man: $(MANPAGES)
33         $(Q)mkdir -p "$(MANDIR)/man1"
34         $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
35
36 uninstall: uninstall-man
37
38 uninstall-man:
39         $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
40
41 clean::
42         $(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%)
43
44 -include $(wildcard $(DOCS:%=%.d))
45
46 .PHONY: documentation