build: remove SRC_PATH_BARE variable
[ffmpeg.git] / doc / Makefile
1 MANPAGES    = $(PROGS-yes:%=doc/%.1)
2 PODPAGES    = $(PROGS-yes:%=doc/%.pod)
3 HTMLPAGES   = $(PROGS-yes:%=doc/%.html)
4
5 DOCS = $(addprefix doc/, developer.html faq.html general.html libavfilter.html) $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
6
7 all-$(CONFIG_DOC): documentation
8
9 documentation: $(DOCS)
10
11 TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
12
13 doc/%.html: TAG = HTML
14 doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init
15         $(Q)$(TEXIDEP)
16         $(M)texi2html -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
17
18 doc/%.pod: TAG = POD
19 doc/%.pod: doc/%.texi
20         $(Q)$(TEXIDEP)
21         $(M)doc/texi2pod.pl $< $@
22
23 doc/%.1: TAG = MAN
24 doc/%.1: doc/%.pod
25         $(M)pod2man --section=1 --center=" " --release=" " $< > $@
26
27 install-progs-$(CONFIG_DOC): install-man
28
29 install-man: $(MANPAGES)
30         $(Q)mkdir -p "$(MANDIR)/man1"
31         $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
32
33 uninstall: uninstall-man
34
35 uninstall-man:
36         $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
37
38 clean::
39         $(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%)
40
41 -include $(wildcard $(DOCS:%=%.d))
42
43 .PHONY: documentation