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.

65 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. TXTPAGES = doc/fate.txt \
  12. DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
  13. ifdef HAVE_MAKEINFO
  14. DOCS += $(TXTPAGES)
  15. endif
  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/%.html: TAG = HTML
  24. doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init
  25. $(Q)$(TEXIDEP)
  26. $(M)texi2html -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
  27. doc/%.pod: TAG = POD
  28. doc/%.pod: doc/%.texi
  29. $(Q)$(TEXIDEP)
  30. $(M)$(SRC_PATH)/doc/texi2pod.pl $< $@
  31. doc/%.1: TAG = MAN
  32. doc/%.1: doc/%.pod
  33. $(M)pod2man --section=1 --center=" " --release=" " $< > $@
  34. $(DOCS): | doc
  35. OBJDIRS += doc
  36. install-progs-$(CONFIG_DOC): install-man
  37. install-man: $(MANPAGES)
  38. $(Q)mkdir -p "$(MANDIR)/man1"
  39. $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
  40. uninstall: uninstall-man
  41. uninstall-man:
  42. $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
  43. clean::
  44. $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%)
  45. -include $(wildcard $(DOCS:%=%.d))
  46. .PHONY: documentation