X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=doc%2FMakefile;h=63530342b3659530c6190799366a3cfe03587730;hb=6d5600e8556a632ca62a2807d994c40251db3bdd;hp=287836f71f3875a3f785985c45b5d45d83b07a6d;hpb=3263626feb329ea711fad5b92a11ee3f0440c7bb;p=ffmpeg diff --git a/doc/Makefile b/doc/Makefile index 287836f71f3..63530342b36 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,20 +1,60 @@ --include ../config.mak +MANPAGES = $(PROGS-yes:%=doc/%.1) +PODPAGES = $(PROGS-yes:%=doc/%.pod) +HTMLPAGES = $(PROGS-yes:%=doc/%.html) \ + doc/developer.html \ + doc/faq.html \ + doc/fate.html \ + doc/general.html \ + doc/git-howto.html \ + doc/libavfilter.html \ + doc/nut.html \ + doc/platform.html \ -VPATH=$(SRC_PATH)/doc +DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES) -all: ffmpeg-doc.html faq.html ffserver-doc.html ffplay-doc.html hooks.html \ - ffmpeg.1 ffserver.1 ffplay.1 +all-$(CONFIG_DOC): documentation -%.html: %.texi Makefile - texi2html -monolithic -number $< +documentation: $(DOCS) -%.pod: %-doc.texi - ./texi2pod.pl $< $@ +TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d) -%.1: %.pod - pod2man --section=1 --center=" " --release=" " $< > $@ +GENTEXI = format codec +GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi) -clean: - rm -f *.html *.pod *.1 +$(GENTEXI): TAG = GENTEXI +$(GENTEXI): doc/avoptions_%.texi: doc/print_options + $(M)doc/print_options $* > $@ -.PHONY: all clean +doc/%.html: TAG = HTML +doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI) + $(Q)$(TEXIDEP) + $(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $< + +doc/%.pod: TAG = POD +doc/%.pod: doc/%.texi $(GENTEXI) + $(Q)$(TEXIDEP) + $(M)$(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@ + +doc/%.1: TAG = MAN +doc/%.1: doc/%.pod $(GENTEXI) + $(M)pod2man --section=1 --center=" " --release=" " $< > $@ + +$(DOCS): | doc/ + +install-progs-$(CONFIG_DOC): install-man + +install-man: $(MANPAGES) + $(Q)mkdir -p "$(MANDIR)/man1" + $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1" + +uninstall: uninstall-man + +uninstall-man: + $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES)) + +clean:: + $(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi + +-include $(wildcard $(DOCS:%=%.d)) + +.PHONY: documentation