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.

60 lines
1.8KB

  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. GENTEXI = format codec
  16. GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
  17. $(GENTEXI): TAG = GENTEXI
  18. $(GENTEXI): doc/avoptions_%.texi: doc/print_options
  19. $(M)doc/print_options $* > $@
  20. doc/%.html: TAG = HTML
  21. doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
  22. $(Q)$(TEXIDEP)
  23. $(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
  24. doc/%.pod: TAG = POD
  25. doc/%.pod: doc/%.texi $(GENTEXI)
  26. $(Q)$(TEXIDEP)
  27. $(M)$(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
  28. doc/%.1: TAG = MAN
  29. doc/%.1: doc/%.pod $(GENTEXI)
  30. $(M)pod2man --section=1 --center=" " --release=" " $< > $@
  31. $(DOCS): | doc/
  32. install-progs-$(CONFIG_DOC): install-man
  33. install-man: $(MANPAGES)
  34. $(Q)mkdir -p "$(MANDIR)/man1"
  35. $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
  36. uninstall: uninstall-man
  37. uninstall-man:
  38. $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
  39. clean::
  40. $(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
  41. -include $(wildcard $(DOCS:%=%.d))
  42. .PHONY: documentation