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.

95 lines
3.0KB

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