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.

88 lines
2.6KB

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