Documentation: Add build support for documentation in pdf format
Makefile already supported dvi, html and info formats, but pdf was missing. pdf is especially convenient for printing and for documentation reviews. I hope it will help to improve qemu's documentation. Make now supports the new target 'pdf' which will create qemu-doc.pdf and qemu-tech.pdf. It is also possible to build both files individually. texi2pdf and texi2dvi are rather noisy, so normally some less important warnings are suppressed. When make is called with V=1 (verbose mode), warnings are not suppressed. The patch also sorts the documentation targets alphabetically and wraps a line which was too long. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
f582af5865
commit
20cc99972c
1
.gitignore
vendored
1
.gitignore
vendored
@ -36,6 +36,7 @@ qemu-monitor.texi
|
|||||||
*.fn
|
*.fn
|
||||||
*.ky
|
*.ky
|
||||||
*.log
|
*.log
|
||||||
|
*.pdf
|
||||||
*.pg
|
*.pg
|
||||||
*.toc
|
*.toc
|
||||||
*.tp
|
*.tp
|
||||||
|
21
Makefile
21
Makefile
@ -22,7 +22,7 @@ Makefile: ;
|
|||||||
configure: ;
|
configure: ;
|
||||||
|
|
||||||
.PHONY: all clean cscope distclean dvi html info install install-doc \
|
.PHONY: all clean cscope distclean dvi html info install install-doc \
|
||||||
recurse-all speed tar tarbin test build-all
|
pdf recurse-all speed tar tarbin test build-all
|
||||||
|
|
||||||
$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
|
$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ distclean: clean
|
|||||||
rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
|
rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
|
||||||
rm -f config-all-devices.mak
|
rm -f config-all-devices.mak
|
||||||
rm -f roms/seabios/config.mak roms/vgabios/config.mak
|
rm -f roms/seabios/config.mak roms/vgabios/config.mak
|
||||||
rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
|
rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pdf,pg,toc,tp,vr}
|
||||||
for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
|
for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
|
||||||
rm -rf $$d || exit 1 ; \
|
rm -rf $$d || exit 1 ; \
|
||||||
done
|
done
|
||||||
@ -224,14 +224,18 @@ cscope:
|
|||||||
cscope -b
|
cscope -b
|
||||||
|
|
||||||
# documentation
|
# documentation
|
||||||
|
TEXIFLAG=$(if $(V),,--quiet)
|
||||||
|
%.dvi: %.texi
|
||||||
|
$(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<," GEN $@")
|
||||||
|
|
||||||
%.html: %.texi
|
%.html: %.texi
|
||||||
$(call quiet-command,texi2html -I=. -monolithic -number $<," GEN $@")
|
$(call quiet-command,texi2html -I=. -monolithic -number $<," GEN $@")
|
||||||
|
|
||||||
%.info: %.texi
|
%.info: %.texi
|
||||||
$(call quiet-command,makeinfo -I . $< -o $@," GEN $@")
|
$(call quiet-command,makeinfo -I . $< -o $@," GEN $@")
|
||||||
|
|
||||||
%.dvi: %.texi
|
%.pdf: %.texi
|
||||||
$(call quiet-command,texi2dvi -I . $<," GEN $@")
|
$(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<," GEN $@")
|
||||||
|
|
||||||
qemu-options.texi: $(SRC_PATH)/qemu-options.hx
|
qemu-options.texi: $(SRC_PATH)/qemu-options.hx
|
||||||
$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
|
$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
|
||||||
@ -260,13 +264,14 @@ qemu-nbd.8: qemu-nbd.texi
|
|||||||
pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
|
pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
|
||||||
" GEN $@")
|
" GEN $@")
|
||||||
|
|
||||||
info: qemu-doc.info qemu-tech.info
|
|
||||||
|
|
||||||
dvi: qemu-doc.dvi qemu-tech.dvi
|
dvi: qemu-doc.dvi qemu-tech.dvi
|
||||||
|
|
||||||
html: qemu-doc.html qemu-tech.html
|
html: qemu-doc.html qemu-tech.html
|
||||||
|
info: qemu-doc.info qemu-tech.info
|
||||||
|
pdf: qemu-doc.pdf qemu-tech.pdf
|
||||||
|
|
||||||
qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-monitor.texi qemu-img-cmds.texi
|
qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \
|
||||||
|
qemu-img.texi qemu-nbd.texi qemu-options.texi \
|
||||||
|
qemu-monitor.texi qemu-img-cmds.texi
|
||||||
|
|
||||||
VERSION ?= $(shell cat VERSION)
|
VERSION ?= $(shell cat VERSION)
|
||||||
FILE = qemu-$(VERSION)
|
FILE = qemu-$(VERSION)
|
||||||
|
Loading…
Reference in New Issue
Block a user