1 MANPAGES = $(PROGS-yes:%=doc/%.1)
2 PODPAGES = $(PROGS-yes:%=doc/%.pod)
3 HTMLPAGES = $(PROGS-yes:%=doc/%.html) \
12 TXTPAGES = doc/fate.txt \
15 DOCS-$(HAVE_TEXI2HTML) += $(HTMLPAGES)
16 DOCS-$(HAVE_POD2MAN) += $(MANPAGES) $(PODPAGES)
17 DOCS-$(HAVE_MAKEINFO) += $(TXTPAGES)
20 all-$(CONFIG_DOC): documentation
22 documentation: $(DOCS)
24 TEXIDEP = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
29 $(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
31 GENTEXI = format codec
32 GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
34 $(GENTEXI): TAG = GENTEXI
35 $(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
36 $(M)doc/print_options $* > $@
38 doc/%.html: TAG = HTML
39 doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
41 $(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
44 doc/%.pod: doc/%.texi $(GENTEXI)
46 $(M)$(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
49 doc/%.1: doc/%.pod $(GENTEXI)
50 $(M)pod2man --section=1 --center=" " --release=" " $< > $@
57 install-progs-$(CONFIG_DOC): install-man
59 install-man: $(MANPAGES)
60 $(Q)mkdir -p "$(MANDIR)/man1"
61 $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
64 uninstall: uninstall-man
67 $(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
70 $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
72 -include $(wildcard $(DOCS:%=%.d))