Merge remote-tracking branch 'qatar/master'
[ffmpeg.git] / doc / Makefile
index d22de79..e46c658 100644 (file)
@@ -6,24 +6,38 @@ HTMLPAGES   = $(PROGS-yes:%=doc/%.html)                                 \
               doc/fate.html                                             \
               doc/general.html                                          \
               doc/git-howto.html                                        \
-              doc/libavfilter.html                                      \
               doc/nut.html                                              \
               doc/platform.html                                         \
+              doc/syntax.html                                           \
 
-DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
+TXTPAGES    = doc/fate.txt                                              \
 
-all-$(CONFIG_DOC): documentation
+
+DOCS-$(CONFIG_HTMLPAGES) += $(HTMLPAGES)
+DOCS-$(CONFIG_PODPAGES)  += $(PODPAGES)
+DOCS-$(CONFIG_MANPAGES)  += $(MANPAGES)
+DOCS-$(CONFIG_TXTPAGES)  += $(TXTPAGES)
+DOCS = $(DOCS-yes)
+
+all-$(CONFIG_DOC): doc
+
+doc: documentation
 
 apidoc: doc/doxy/html
 documentation: $(DOCS)
 
-TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
+TEXIDEP = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
+
+doc/%.txt: TAG = TXT
+doc/%.txt: doc/%.texi
+       $(Q)$(TEXIDEP)
+       $(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
 
 GENTEXI  = format codec
 GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
 
 $(GENTEXI): TAG = GENTEXI
-$(GENTEXI): doc/avoptions_%.texi: doc/print_options
+$(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
        $(M)doc/print_options $* > $@
 
 doc/%.html: TAG = HTML
@@ -34,7 +48,7 @@ doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
 doc/%.pod: TAG = POD
 doc/%.pod: doc/%.texi $(GENTEXI)
        $(Q)$(TEXIDEP)
-       $(M)$(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
+       $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
 
 doc/%.1: TAG = MAN
 doc/%.1: doc/%.pod $(GENTEXI)
@@ -45,11 +59,15 @@ $(DOCS) doc/doxy/html: | doc/
 doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
        $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
 
+install-man:
+
+ifdef CONFIG_MANPAGES
 install-progs-$(CONFIG_DOC): install-man
 
 install-man: $(MANPAGES)
        $(Q)mkdir -p "$(MANDIR)/man1"
        $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
+endif
 
 uninstall: uninstall-man
 
@@ -57,9 +75,9 @@ uninstall-man:
        $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
 
 clean::
-       $(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
+       $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
        $(RM) -r doc/doxy/html
 
 -include $(wildcard $(DOCS:%=%.d))
 
-.PHONY: apidoc documentation
+.PHONY: apidoc doc documentation