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.

73 lines
2.2KB

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