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.

62 lines
1.9KB

  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/platform.html \
  11. DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
  12. all-$(CONFIG_DOC): documentation
  13. documentation: $(DOCS)
  14. TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
  15. doc/print_options.o: libavformat/options_table.h libavcodec/options_table.h
  16. GENTEXI = format codec
  17. GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
  18. $(GENTEXI): TAG = GENTEXI
  19. $(GENTEXI): doc/avoptions_%.texi: doc/print_options
  20. $(M)doc/print_options $* > $@
  21. doc/%.html: TAG = HTML
  22. doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
  23. $(Q)$(TEXIDEP)
  24. $(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
  25. doc/%.pod: TAG = POD
  26. doc/%.pod: doc/%.texi $(GENTEXI)
  27. $(Q)$(TEXIDEP)
  28. $(M)$(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
  29. doc/%.1: TAG = MAN
  30. doc/%.1: doc/%.pod $(GENTEXI)
  31. $(M)pod2man --section=1 --center=" " --release=" " $< > $@
  32. $(DOCS): | doc/
  33. install-progs-$(CONFIG_DOC): install-man
  34. install-man: $(MANPAGES)
  35. $(Q)mkdir -p "$(MANDIR)/man1"
  36. $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
  37. uninstall: uninstall-man
  38. uninstall-man:
  39. $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
  40. clean::
  41. $(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
  42. -include $(wildcard $(DOCS:%=%.d))
  43. .PHONY: documentation