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