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.

96 lines
3.1KB

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