]> git.sesse.net Git - ffmpeg/blob - doc/Makefile
avdevice/sdl2 : add option to define if the window quit action is available
[ffmpeg] / doc / Makefile
1 LIBRARIES-$(CONFIG_AVUTIL)     += libavutil
2 LIBRARIES-$(CONFIG_SWSCALE)    += libswscale
3 LIBRARIES-$(CONFIG_SWRESAMPLE) += libswresample
4 LIBRARIES-$(CONFIG_AVCODEC)    += libavcodec
5 LIBRARIES-$(CONFIG_AVFORMAT)   += libavformat
6 LIBRARIES-$(CONFIG_AVDEVICE)   += libavdevice
7 LIBRARIES-$(CONFIG_AVFILTER)   += libavfilter
8
9 COMPONENTS-$(CONFIG_AVUTIL)     += ffmpeg-utils
10 COMPONENTS-$(CONFIG_SWSCALE)    += ffmpeg-scaler
11 COMPONENTS-$(CONFIG_SWRESAMPLE) += ffmpeg-resampler
12 COMPONENTS-$(CONFIG_AVCODEC)    += ffmpeg-codecs ffmpeg-bitstream-filters
13 COMPONENTS-$(CONFIG_AVFORMAT)   += ffmpeg-formats ffmpeg-protocols
14 COMPONENTS-$(CONFIG_AVDEVICE)   += ffmpeg-devices
15 COMPONENTS-$(CONFIG_AVFILTER)   += ffmpeg-filters
16
17 MANPAGES1   = $(AVPROGS-yes:%=doc/%.1)    $(AVPROGS-yes:%=doc/%-all.1)    $(COMPONENTS-yes:%=doc/%.1)
18 MANPAGES3   = $(LIBRARIES-yes:%=doc/%.3)
19 MANPAGES    = $(MANPAGES1) $(MANPAGES3)
20 PODPAGES    = $(AVPROGS-yes:%=doc/%.pod)  $(AVPROGS-yes:%=doc/%-all.pod)  $(COMPONENTS-yes:%=doc/%.pod)  $(LIBRARIES-yes:%=doc/%.pod)
21 HTMLPAGES   = $(AVPROGS-yes:%=doc/%.html) $(AVPROGS-yes:%=doc/%-all.html) $(COMPONENTS-yes:%=doc/%.html) $(LIBRARIES-yes:%=doc/%.html) \
22               doc/developer.html                                        \
23               doc/faq.html                                              \
24               doc/fate.html                                             \
25               doc/general.html                                          \
26               doc/git-howto.html                                        \
27               doc/mailing-list-faq.html                                 \
28               doc/nut.html                                              \
29               doc/platform.html                                         \
30
31 TXTPAGES    = doc/fate.txt                                              \
32
33
34 DOCS-$(CONFIG_HTMLPAGES) += $(HTMLPAGES)
35 DOCS-$(CONFIG_PODPAGES)  += $(PODPAGES)
36 DOCS-$(CONFIG_MANPAGES)  += $(MANPAGES)
37 DOCS-$(CONFIG_TXTPAGES)  += $(TXTPAGES)
38 DOCS = $(DOCS-yes)
39
40 all-$(CONFIG_DOC): doc
41
42 doc: documentation
43
44 apidoc: doc/doxy/html
45 documentation: $(DOCS)
46
47 TEXIDEP = perl $(SRC_PATH)/doc/texidep.pl $(SRC_PATH) $< $@ >$(@:%=%.d)
48
49 doc/%.txt: TAG = TXT
50 doc/%.txt: doc/%.texi
51         $(Q)$(TEXIDEP)
52         $(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
53
54 GENTEXI  = format codec
55 GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
56
57 $(GENTEXI): TAG = GENTEXI
58 $(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
59         $(M)doc/print_options $* > $@
60
61 doc/%.html: TAG = HTML
62 doc/%-all.html: TAG = HTML
63
64 ifdef HAVE_MAKEINFO_HTML
65 doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.pm $(GENTEXI)
66         $(Q)$(TEXIDEP)
67         $(M)makeinfo --html -I doc --no-split -D config-not-all --init-file=$(SRC_PATH)/doc/t2h.pm --output $@ $<
68
69 doc/%-all.html: doc/%.texi $(SRC_PATH)/doc/t2h.pm $(GENTEXI)
70         $(Q)$(TEXIDEP)
71         $(M)makeinfo --html -I doc --no-split -D config-all --init-file=$(SRC_PATH)/doc/t2h.pm --output $@ $<
72 else
73 doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
74         $(Q)$(TEXIDEP)
75         $(M)texi2html -I doc -monolithic --D=config-not-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
76
77 doc/%-all.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
78         $(Q)$(TEXIDEP)
79         $(M)texi2html -I doc -monolithic --D=config-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
80 endif
81
82 doc/%.pod: TAG = POD
83 doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
84         $(Q)$(TEXIDEP)
85         $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-not-all=yes -Idoc $< $@
86
87 doc/%-all.pod: TAG = POD
88 doc/%-all.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
89         $(Q)$(TEXIDEP)
90         $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-all=yes -Idoc $< $@
91
92 doc/%.1 doc/%.3: TAG = MAN
93 doc/%.1: doc/%.pod $(GENTEXI)
94         $(M)pod2man --section=1 --center=" " --release=" " --date=" " $< > $@
95 doc/%.3: doc/%.pod $(GENTEXI)
96         $(M)pod2man --section=3 --center=" " --release=" " --date=" " $< > $@
97
98 $(DOCS) doc/doxy/html: | doc/
99
100 DOXY_INPUT      = $(INSTHEADERS)
101 DOXY_INPUT_DEPS = $(addprefix $(SRC_PATH)/, $(DOXY_INPUT)) ffbuild/config.mak
102
103 doc/doxy/html: TAG = DOXY
104 doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(SRC_PATH)/doc/doxy-wrapper.sh $(DOXY_INPUT_DEPS)
105         $(M)OUT_DIR=$$PWD/doc/doxy; cd $(SRC_PATH); ./doc/doxy-wrapper.sh $$OUT_DIR $< $(DOXYGEN) $(DOXY_INPUT);
106
107 install-doc: install-html install-man
108
109 install-html:
110
111 install-man:
112
113 ifdef CONFIG_HTMLPAGES
114 install-progs-$(CONFIG_DOC): install-html
115
116 install-html: $(HTMLPAGES)
117         $(Q)mkdir -p "$(DOCDIR)"
118         $(INSTALL) -m 644 $(HTMLPAGES) "$(DOCDIR)"
119 endif
120
121 ifdef CONFIG_MANPAGES
122 install-progs-$(CONFIG_DOC): install-man
123
124 install-man: $(MANPAGES)
125         $(Q)mkdir -p "$(MANDIR)/man1"
126         $(INSTALL) -m 644 $(MANPAGES1) "$(MANDIR)/man1"
127         $(Q)mkdir -p "$(MANDIR)/man3"
128         $(INSTALL) -m 644 $(MANPAGES3) "$(MANDIR)/man3"
129 endif
130
131 uninstall: uninstall-doc
132
133 uninstall-doc: uninstall-html uninstall-man
134
135 uninstall-html:
136         $(RM) -r "$(DOCDIR)"
137
138 uninstall-man:
139         $(RM) $(addprefix "$(MANDIR)/man1/",$(AVPROGS-yes:%=%.1) $(AVPROGS-yes:%=%-all.1) $(COMPONENTS-yes:%=%.1))
140         $(RM) $(addprefix "$(MANDIR)/man3/",$(LIBRARIES-yes:%=%.3))
141
142 clean:: docclean
143
144 distclean:: docclean
145         $(RM) doc/config.texi
146
147 docclean::
148         $(RM) $(CLEANSUFFIXES:%=doc/%)
149         $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 doc/avoptions_*.texi
150         $(RM) -r doc/doxy/html
151
152 -include $(wildcard $(DOCS:%=%.d))
153
154 .PHONY: apidoc doc documentation