doc/doxy: remove unused files
[ffmpeg.git] / 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/nut.html                                              \
28               doc/platform.html                                         \
29
30 TXTPAGES    = doc/fate.txt                                              \
31
32
33 DOCS-$(CONFIG_HTMLPAGES) += $(HTMLPAGES)
34 DOCS-$(CONFIG_PODPAGES)  += $(PODPAGES)
35 DOCS-$(CONFIG_MANPAGES)  += $(MANPAGES)
36 DOCS-$(CONFIG_TXTPAGES)  += $(TXTPAGES)
37 DOCS = $(DOCS-yes)
38
39 DOC_EXAMPLES-$(CONFIG_DECODING_ENCODING_EXAMPLE) += decoding_encoding
40 DOC_EXAMPLES-$(CONFIG_DEMUXING_DECODING_EXAMPLE) += demuxing_decoding
41 DOC_EXAMPLES-$(CONFIG_FILTERING_AUDIO_EXAMPLE)   += filtering_audio
42 DOC_EXAMPLES-$(CONFIG_FILTERING_VIDEO_EXAMPLE)   += filtering_video
43 DOC_EXAMPLES-$(CONFIG_METADATA_EXAMPLE)          += metadata
44 DOC_EXAMPLES-$(CONFIG_MUXING_EXAMPLE)            += muxing
45 DOC_EXAMPLES-$(CONFIG_RESAMPLING_AUDIO_EXAMPLE)  += resampling_audio
46 DOC_EXAMPLES-$(CONFIG_SCALING_VIDEO_EXAMPLE)     += scaling_video
47 DOC_EXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE)     += transcode_aac
48 ALL_DOC_EXAMPLES_LIST = $(DOC_EXAMPLES-) $(DOC_EXAMPLES-yes)
49
50 DOC_EXAMPLES       := $(DOC_EXAMPLES-yes:%=doc/examples/%$(PROGSSUF)$(EXESUF))
51 ALL_DOC_EXAMPLES   := $(ALL_DOC_EXAMPLES_LIST:%=doc/examples/%$(PROGSSUF)$(EXESUF))
52 ALL_DOC_EXAMPLES_G := $(ALL_DOC_EXAMPLES_LIST:%=doc/examples/%$(PROGSSUF)_g$(EXESUF))
53 PROGS              += $(DOC_EXAMPLES)
54
55 all-$(CONFIG_DOC): doc
56
57 doc: documentation
58
59 apidoc: doc/doxy/html
60 documentation: $(DOCS)
61
62 examples: $(DOC_EXAMPLES)
63
64 TEXIDEP = perl $(SRC_PATH)/doc/texidep.pl $(SRC_PATH) $< $@ >$(@:%=%.d)
65
66 doc/%.txt: TAG = TXT
67 doc/%.txt: doc/%.texi
68         $(Q)$(TEXIDEP)
69         $(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
70
71 GENTEXI  = format codec
72 GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
73
74 $(GENTEXI): TAG = GENTEXI
75 $(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
76         $(M)doc/print_options $* > $@
77
78 doc/%.html: TAG = HTML
79 doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
80         $(Q)$(TEXIDEP)
81         $(M)texi2html -I doc -monolithic --D=config-not-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
82
83 doc/%-all.html: TAG = HTML
84 doc/%-all.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
85         $(Q)$(TEXIDEP)
86         $(M)texi2html -I doc -monolithic --D=config-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
87
88 doc/%.pod: TAG = POD
89 doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
90         $(Q)$(TEXIDEP)
91         $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-not-all=yes -Idoc $< $@
92
93 doc/%-all.pod: TAG = POD
94 doc/%-all.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
95         $(Q)$(TEXIDEP)
96         $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-all=yes -Idoc $< $@
97
98 doc/%.1 doc/%.3: TAG = MAN
99 doc/%.1: doc/%.pod $(GENTEXI)
100         $(M)pod2man --section=1 --center=" " --release=" " $< > $@
101 doc/%.3: doc/%.pod $(GENTEXI)
102         $(M)pod2man --section=3 --center=" " --release=" " $< > $@
103
104 $(DOCS) doc/doxy/html: | doc/
105 $(DOC_EXAMPLES:%=%.o): | doc/examples
106 OBJDIRS += doc/examples
107
108 doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
109         $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
110
111 install-doc: install-html install-man
112
113 install-html:
114
115 install-man:
116
117 ifdef CONFIG_HTMLPAGES
118 install-progs-$(CONFIG_DOC): install-html
119
120 install-html: $(HTMLPAGES)
121         $(Q)mkdir -p "$(DOCDIR)"
122         $(INSTALL) -m 644 $(HTMLPAGES) "$(DOCDIR)"
123 endif
124
125 ifdef CONFIG_MANPAGES
126 install-progs-$(CONFIG_DOC): install-man
127
128 install-man: $(MANPAGES)
129         $(Q)mkdir -p "$(MANDIR)/man1"
130         $(INSTALL) -m 644 $(MANPAGES1) "$(MANDIR)/man1"
131         $(Q)mkdir -p "$(MANDIR)/man3"
132         $(INSTALL) -m 644 $(MANPAGES3) "$(MANDIR)/man3"
133 endif
134
135 uninstall: uninstall-doc
136
137 uninstall-doc: uninstall-html uninstall-man
138
139 uninstall-html:
140         $(RM) -r "$(DOCDIR)"
141
142 uninstall-man:
143         $(RM) $(addprefix "$(MANDIR)/man1/",$(AVPROGS-yes:%=%.1) $(AVPROGS-yes:%=%-all.1) $(COMPONENTS-yes:%=%.1))
144         $(RM) $(addprefix "$(MANDIR)/man3/",$(LIBRARIES-yes:%=%.3))
145
146 clean:: docclean
147
148 distclean:: docclean
149         $(RM) doc/config.texi
150
151 examplesclean:
152         $(RM) $(ALL_DOC_EXAMPLES) $(ALL_DOC_EXAMPLES_G)
153         $(RM) $(CLEANSUFFIXES:%=doc/examples/%)
154
155 docclean: examplesclean
156         $(RM) $(CLEANSUFFIXES:%=doc/%)
157         $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 doc/avoptions_*.texi
158         $(RM) -r doc/doxy/html
159
160 -include $(wildcard $(DOCS:%=%.d))
161
162 .PHONY: apidoc doc documentation