2013-11-02 18:44:18 +03:00
|
|
|
ALLMANPAGES = $(AVBASENAMES:%=%.1)
|
|
|
|
MANPAGES = $(AVPROGS-yes:%=doc/%.1)
|
|
|
|
PODPAGES = $(AVPROGS-yes:%=doc/%.pod)
|
|
|
|
HTMLPAGES = $(AVPROGS-yes:%=doc/%.html) \
|
2011-12-07 23:49:53 +03:00
|
|
|
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-07 23:49:53 +03:00
|
|
|
doc/libavfilter.html \
|
2011-12-14 01:50:20 +03:00
|
|
|
doc/nut.html \
|
2011-12-03 23:25:04 +03:00
|
|
|
doc/platform.html \
|
2011-06-06 20:03:22 +03:00
|
|
|
|
2013-11-26 22:37:54 +03:00
|
|
|
DOCS-$(CONFIG_POD2MAN) += $(MANPAGES) $(PODPAGES)
|
2013-11-22 03:57:56 +03:00
|
|
|
DOCS-$(CONFIG_TEXI2HTML) += $(HTMLPAGES)
|
|
|
|
DOCS = $(DOCS-yes)
|
2011-06-06 20:03:22 +03:00
|
|
|
|
2014-02-15 17:50:29 +03:00
|
|
|
DOC_EXAMPLES-$(CONFIG_AVCODEC_EXAMPLE) += avcodec
|
2014-02-13 10:50:16 +03:00
|
|
|
DOC_EXAMPLES-$(CONFIG_FILTER_AUDIO_EXAMPLE) += filter_audio
|
2014-02-15 17:50:29 +03:00
|
|
|
DOC_EXAMPLES-$(CONFIG_METADATA_EXAMPLE) += metadata
|
2013-11-02 19:05:28 +03:00
|
|
|
DOC_EXAMPLES-$(CONFIG_OUTPUT_EXAMPLE) += output
|
2015-02-12 01:07:29 +02:00
|
|
|
DOC_EXAMPLES-$(CONFIG_QSVDEC_EXAMPLE) += qsvdec
|
2013-10-08 14:10:46 +03:00
|
|
|
DOC_EXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE) += transcode_aac
|
2014-02-13 10:50:16 +03:00
|
|
|
ALL_DOC_EXAMPLES = avcodec filter_audio metadata output transcode_aac
|
2013-11-02 19:05:28 +03:00
|
|
|
|
|
|
|
DOC_EXAMPLES := $(DOC_EXAMPLES-yes:%=doc/examples/%$(EXESUF))
|
|
|
|
ALL_DOC_EXAMPLES := $(ALL_DOC_EXAMPLES:%=doc/examples/%$(EXESUF))
|
|
|
|
PROGS += $(DOC_EXAMPLES)
|
|
|
|
|
2013-11-22 03:57:56 +03:00
|
|
|
all: $(DOCS)
|
2011-06-06 20:03:22 +03:00
|
|
|
|
2012-10-29 18:26:59 +03:00
|
|
|
apidoc: doc/doxy/html
|
2011-06-06 20:03:22 +03:00
|
|
|
documentation: $(DOCS)
|
|
|
|
|
2013-11-02 19:05:28 +03:00
|
|
|
examples: $(DOC_EXAMPLES)
|
|
|
|
|
2011-06-06 20:03:22 +03:00
|
|
|
TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
|
|
|
|
|
2012-03-14 22:08:50 +03:00
|
|
|
GENTEXI = format codec
|
|
|
|
GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
|
|
|
|
|
|
|
|
$(GENTEXI): TAG = GENTEXI
|
2013-11-25 00:11:59 +03:00
|
|
|
$(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
|
2012-03-14 22:08:50 +03:00
|
|
|
$(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
|
2013-01-23 12:08:57 +03:00
|
|
|
doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(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-10-29 18:26:59 +03:00
|
|
|
$(DOCS) doc/doxy/html: | doc/
|
2014-02-10 02:23:28 +03:00
|
|
|
$(DOC_EXAMPLES:%$(EXESUF)=%.o): | doc/examples
|
2013-11-02 19:05:28 +03:00
|
|
|
OBJDIRS += doc/examples
|
2012-10-29 18:26:59 +03:00
|
|
|
|
2014-02-11 20:38:03 +03:00
|
|
|
DOXY_INPUT = $(addprefix $(SRC_PATH)/, $(INSTHEADERS) $(DOC_EXAMPLES:%$(EXESUF)=%.c) $(LIB_EXAMPLES:%$(EXESUF)=%.c))
|
2013-12-16 11:30:17 +03:00
|
|
|
DOXY_TEMPLATES = doxy_stylesheet.css footer.html header.html
|
|
|
|
DOXY_TEMPLATES := $(addprefix $(SRC_PATH)/doc/doxy/, $(DOXY_TEMPLATES))
|
|
|
|
|
2014-02-11 19:30:43 +03:00
|
|
|
doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(DOXY_INPUT) $(DOXY_TEMPLATES)
|
|
|
|
$(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $< $(DOXY_INPUT)
|
2011-06-28 20:45:13 +03:00
|
|
|
|
2013-11-26 22:37:54 +03:00
|
|
|
install-progs-$(CONFIG_POD2MAN): install-man
|
2013-11-22 03:57:56 +03:00
|
|
|
install-progs-$(CONFIG_TEXI2HTML): install-doc
|
2013-08-28 11:30:14 +03:00
|
|
|
|
|
|
|
install-doc: $(HTMLPAGES)
|
|
|
|
$(Q)mkdir -p "$(DOCDIR)"
|
|
|
|
$(INSTALL) -m 644 $(HTMLPAGES) "$(DOCDIR)"
|
2011-06-06 20:03:22 +03:00
|
|
|
|
|
|
|
install-man: $(MANPAGES)
|
|
|
|
$(Q)mkdir -p "$(MANDIR)/man1"
|
|
|
|
$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
|
|
|
|
|
2013-08-28 11:30:14 +03:00
|
|
|
uninstall: uninstall-doc uninstall-man
|
|
|
|
|
|
|
|
uninstall-doc:
|
|
|
|
$(RM) -r "$(DOCDIR)"
|
2011-06-06 20:03:22 +03:00
|
|
|
|
|
|
|
uninstall-man:
|
|
|
|
$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
|
|
|
|
|
|
|
clean::
|
2013-11-02 19:05:28 +03:00
|
|
|
$(RM) $(ALL_DOC_EXAMPLES)
|
|
|
|
$(RM) $(CLEANSUFFIXES:%=doc/%) $(CLEANSUFFIXES:%=doc/examples/%)
|
|
|
|
$(RM) doc/*.html doc/*.pod doc/*.1 doc/avoptions_*.texi
|
2012-10-29 18:26:59 +03:00
|
|
|
$(RM) -r doc/doxy/html
|
2011-06-06 20:03:22 +03:00
|
|
|
|
|
|
|
-include $(wildcard $(DOCS:%=%.d))
|
|
|
|
|
2012-10-29 18:26:59 +03:00
|
|
|
.PHONY: apidoc documentation
|