2011-06-06 20:03:22 +03:00
|
|
|
MANPAGES = $(PROGS-yes:%=doc/%.1)
|
|
|
|
PODPAGES = $(PROGS-yes:%=doc/%.pod)
|
2011-12-07 23:49:53 +03:00
|
|
|
HTMLPAGES = $(PROGS-yes:%=doc/%.html) \
|
|
|
|
doc/developer.html \
|
|
|
|
doc/faq.html \
|
2011-12-02 03:33:07 +03:00
|
|
|
doc/fate.html \
|
2011-12-07 23:49:53 +03:00
|
|
|
doc/general.html \
|
2011-12-03 20:06:14 +03:00
|
|
|
doc/git-howto.html \
|
2011-12-03 23:25:04 +03:00
|
|
|
doc/platform.html \
|
2012-05-03 16:14:14 +03:00
|
|
|
doc/syntax.html \
|
2011-06-06 20:03:22 +03:00
|
|
|
|
2011-12-20 02:28:47 +03:00
|
|
|
TXTPAGES = doc/fate.txt \
|
|
|
|
|
|
|
|
|
2012-07-12 04:41:25 +03:00
|
|
|
DOCS-$(HAVE_TEXI2HTML) += $(HTMLPAGES)
|
|
|
|
DOCS-$(HAVE_POD2MAN) += $(MANPAGES) $(PODPAGES)
|
|
|
|
DOCS-$(HAVE_MAKEINFO) += $(TXTPAGES)
|
|
|
|
DOCS = $(DOCS-yes)
|
2011-06-06 20:03:22 +03:00
|
|
|
|
|
|
|
all-$(CONFIG_DOC): documentation
|
|
|
|
|
|
|
|
documentation: $(DOCS)
|
|
|
|
|
2011-12-20 02:27:22 +03:00
|
|
|
TEXIDEP = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
|
2011-06-06 20:03:22 +03:00
|
|
|
|
2011-12-20 02:28:47 +03:00
|
|
|
doc/%.txt: TAG = TXT
|
|
|
|
doc/%.txt: doc/%.texi
|
|
|
|
$(Q)$(TEXIDEP)
|
|
|
|
$(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
|
|
|
|
|
2012-03-14 22:08:50 +03:00
|
|
|
doc/print_options.o: libavformat/options_table.h libavcodec/options_table.h
|
|
|
|
|
|
|
|
GENTEXI = format codec
|
|
|
|
GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
|
|
|
|
|
|
|
|
$(GENTEXI): TAG = GENTEXI
|
|
|
|
$(GENTEXI): doc/avoptions_%.texi: doc/print_options
|
|
|
|
$(M)doc/print_options $* > $@
|
|
|
|
|
2011-06-06 20:03:22 +03:00
|
|
|
doc/%.html: TAG = HTML
|
2012-03-14 22:08:50 +03:00
|
|
|
doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
|
2011-06-06 20:03:22 +03:00
|
|
|
$(Q)$(TEXIDEP)
|
2012-03-20 13:54:02 +03:00
|
|
|
$(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
|
2011-06-06 20:03:22 +03:00
|
|
|
|
|
|
|
doc/%.pod: TAG = POD
|
2012-03-14 22:08:50 +03:00
|
|
|
doc/%.pod: doc/%.texi $(GENTEXI)
|
2011-06-06 20:03:22 +03:00
|
|
|
$(Q)$(TEXIDEP)
|
2012-03-20 13:54:02 +03:00
|
|
|
$(M)$(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
|
2011-06-06 20:03:22 +03:00
|
|
|
|
|
|
|
doc/%.1: TAG = MAN
|
2012-03-14 22:08:50 +03:00
|
|
|
doc/%.1: doc/%.pod $(GENTEXI)
|
2011-06-06 20:03:22 +03:00
|
|
|
$(M)pod2man --section=1 --center=" " --release=" " $< > $@
|
|
|
|
|
2012-03-28 00:42:41 +03:00
|
|
|
$(DOCS): | doc/
|
2011-06-28 20:45:13 +03:00
|
|
|
|
2012-07-12 04:41:25 +03:00
|
|
|
install-man:
|
|
|
|
|
|
|
|
ifdef HAVE_POD2MAN
|
2011-06-06 20:03:22 +03:00
|
|
|
install-progs-$(CONFIG_DOC): install-man
|
|
|
|
|
|
|
|
install-man: $(MANPAGES)
|
|
|
|
$(Q)mkdir -p "$(MANDIR)/man1"
|
|
|
|
$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
|
2012-07-12 04:41:25 +03:00
|
|
|
endif
|
2011-06-06 20:03:22 +03:00
|
|
|
|
|
|
|
uninstall: uninstall-man
|
|
|
|
|
|
|
|
uninstall-man:
|
|
|
|
$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
|
|
|
|
|
|
|
clean::
|
2012-03-21 02:15:18 +03:00
|
|
|
$(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
|
2011-06-06 20:03:22 +03:00
|
|
|
|
|
|
|
-include $(wildcard $(DOCS:%=%.d))
|
|
|
|
|
|
|
|
.PHONY: documentation
|