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.

77 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/platform.html \
  10. doc/syntax.html \
  11. TXTPAGES = doc/fate.txt \
  12. DOCS-$(HAVE_TEXI2HTML) += $(HTMLPAGES)
  13. DOCS-$(HAVE_POD2MAN) += $(MANPAGES) $(PODPAGES)
  14. DOCS-$(HAVE_MAKEINFO) += $(TXTPAGES)
  15. DOCS = $(DOCS-yes)
  16. all-$(CONFIG_DOC): documentation
  17. documentation: $(DOCS)
  18. TEXIDEP = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
  19. doc/%.txt: TAG = TXT
  20. doc/%.txt: doc/%.texi
  21. $(Q)$(TEXIDEP)
  22. $(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
  23. doc/print_options.o: libavformat/options_table.h libavcodec/options_table.h
  24. GENTEXI = format codec
  25. GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
  26. $(GENTEXI): TAG = GENTEXI
  27. $(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
  28. $(M)doc/print_options $* > $@
  29. doc/%.html: TAG = HTML
  30. doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
  31. $(Q)$(TEXIDEP)
  32. $(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
  33. doc/%.pod: TAG = POD
  34. doc/%.pod: doc/%.texi $(GENTEXI)
  35. $(Q)$(TEXIDEP)
  36. $(M)$(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
  37. doc/%.1: TAG = MAN
  38. doc/%.1: doc/%.pod $(GENTEXI)
  39. $(M)pod2man --section=1 --center=" " --release=" " $< > $@
  40. $(DOCS): | doc/
  41. install-man:
  42. ifdef HAVE_POD2MAN
  43. install-progs-$(CONFIG_DOC): install-man
  44. install-man: $(MANPAGES)
  45. $(Q)mkdir -p "$(MANDIR)/man1"
  46. $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
  47. endif
  48. uninstall: uninstall-man
  49. uninstall-man:
  50. $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
  51. clean::
  52. $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
  53. -include $(wildcard $(DOCS:%=%.d))
  54. .PHONY: documentation