doc/Makefile
f87b03b5
 MANPAGES    = $(PROGS-yes:%=doc/%.1)
 PODPAGES    = $(PROGS-yes:%=doc/%.pod)
47b20a1d
 HTMLPAGES   = $(PROGS-yes:%=doc/%.html)                                 \
               doc/developer.html                                        \
               doc/faq.html                                              \
1ebbdda1
               doc/fate.html                                             \
47b20a1d
               doc/general.html                                          \
2f017d97
               doc/git-howto.html                                        \
47b20a1d
               doc/libavfilter.html                                      \
1de6e14e
               doc/platform.html                                         \
27127ebe
               doc/syntax.html                                           \
f87b03b5
 
abab4408
 TXTPAGES    = doc/fate.txt                                              \
 
 
47b20a1d
 DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
abab4408
 ifdef HAVE_MAKEINFO
 DOCS += $(TXTPAGES)
 endif
f87b03b5
 
 all-$(CONFIG_DOC): documentation
 
 documentation: $(DOCS)
 
c7062802
 TEXIDEP = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
f87b03b5
 
abab4408
 doc/%.txt: TAG = TXT
 doc/%.txt: doc/%.texi
 	$(Q)$(TEXIDEP)
 	$(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
 
0d0b81f9
 doc/print_options.o: libavformat/options_table.h libavcodec/options_table.h
 
 GENTEXI  = format codec
 GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
 
 $(GENTEXI): TAG = GENTEXI
 $(GENTEXI): doc/avoptions_%.texi: doc/print_options
 	$(M)doc/print_options $* > $@
 
f87b03b5
 doc/%.html: TAG = HTML
0d0b81f9
 doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
f87b03b5
 	$(Q)$(TEXIDEP)
2ac3df85
 	$(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
f87b03b5
 
 doc/%.pod: TAG = POD
0d0b81f9
 doc/%.pod: doc/%.texi $(GENTEXI)
f87b03b5
 	$(Q)$(TEXIDEP)
2ac3df85
 	$(M)$(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
f87b03b5
 
 doc/%.1: TAG = MAN
0d0b81f9
 doc/%.1: doc/%.pod $(GENTEXI)
f87b03b5
 	$(M)pod2man --section=1 --center=" " --release=" " $< > $@
 
2efb710a
 $(DOCS): | doc/
5e27ec28
 
f87b03b5
 install-progs-$(CONFIG_DOC): install-man
 
 install-man: $(MANPAGES)
 	$(Q)mkdir -p "$(MANDIR)/man1"
 	$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
 
 uninstall: uninstall-man
 
 uninstall-man:
 	$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
 
 clean::
0ebd8361
 	$(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
f87b03b5
 
 -include $(wildcard $(DOCS:%=%.d))
 
 .PHONY: documentation