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.

86 lines
2.6KB

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