doc: add libavfilter.texi
[ffmpeg.git] / doc / Makefile
1 DOCLIBS-$(CONFIG_AVUTIL)  += libavutil
2 DOCLIBS-$(CONFIG_AVCODEC) += libavcodec
3 DOCLIBS-$(CONFIG_AVFILTER) += libavfilter
4
5 MANPAGES    = $(PROGS-yes:%=doc/%.1)    $(DOCLIBS-yes:%=doc/%.3)
6 PODPAGES    = $(PROGS-yes:%=doc/%.pod)  $(DOCLIBS-yes:%=doc/%.pod)
7 HTMLPAGES   = $(PROGS-yes:%=doc/%.html) $(DOCLIBS-yes:%=doc/%.html)     \
8               doc/developer.html                                        \
9               doc/faq.html                                              \
10               doc/fate.html                                             \
11               doc/general.html                                          \
12               doc/git-howto.html                                        \
13               doc/nut.html                                              \
14               doc/platform.html                                         \
15               doc/syntax.html                                           \
16
17 TXTPAGES    = doc/fate.txt                                              \
18
19
20 DOCS-$(CONFIG_HTMLPAGES) += $(HTMLPAGES)
21 DOCS-$(CONFIG_PODPAGES)  += $(PODPAGES)
22 DOCS-$(CONFIG_MANPAGES)  += $(MANPAGES)
23 DOCS-$(CONFIG_TXTPAGES)  += $(TXTPAGES)
24 DOCS = $(DOCS-yes)
25
26 all-$(CONFIG_DOC): doc
27
28 doc: documentation
29
30 apidoc: doc/doxy/html
31 documentation: $(DOCS)
32
33 TEXIDEP = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
34
35 doc/%.txt: TAG = TXT
36 doc/%.txt: doc/%.texi
37         $(Q)$(TEXIDEP)
38         $(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
39
40 GENTEXI  = format codec
41 GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
42
43 $(GENTEXI): TAG = GENTEXI
44 $(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
45         $(M)doc/print_options $* > $@
46
47 doc/%.html: TAG = HTML
48 doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
49         $(Q)$(TEXIDEP)
50         $(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
51
52 doc/%.pod: TAG = POD
53 doc/%.pod: doc/%.texi $(GENTEXI)
54         $(Q)$(TEXIDEP)
55         $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
56
57 doc/%.1 doc/%.3: TAG = MAN
58 doc/%.1 doc/%.3: doc/%.pod $(GENTEXI)
59         $(M)pod2man --section=1 --center=" " --release=" " $< > $@
60
61 $(DOCS) doc/doxy/html: | doc/
62
63 doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
64         $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
65
66 install-man:
67
68 ifdef CONFIG_MANPAGES
69 install-progs-$(CONFIG_DOC): install-man
70
71 install-man: $(MANPAGES)
72         $(Q)mkdir -p "$(MANDIR)/man1"
73         $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
74 endif
75
76 uninstall: uninstall-man
77
78 uninstall-man:
79         $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
80
81 clean::
82         $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
83         $(RM) -r doc/doxy/html
84
85 -include $(wildcard $(DOCS:%=%.d))
86
87 .PHONY: apidoc doc documentation