You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
2.9KB

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