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.

93 lines
2.9KB

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