aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2012-03-20 02:25:57 +0400
committerBlue Swirl <blauwirbel@gmail.com>2012-03-24 14:10:25 +0000
commit3179d694a8dcaa091131e3db644d445c0130713e (patch)
tree58aacdbfc4777972580872d9cdb191d348de7ca3 /Makefile
parent813da6277cf6325ee97e7b7724e1672053356f4c (diff)
downloadqemu-3179d694a8dcaa091131e3db644d445c0130713e.zip
qemu-3179d694a8dcaa091131e3db644d445c0130713e.tar.gz
qemu-3179d694a8dcaa091131e3db644d445c0130713e.tar.bz2
Support utf8 chars in pod docs
We've at least one UTF8 char in the qemu texi doc: $ grep Tibor qemu-doc.texi by Tibor "TS" Schütz. $ man ./qemu.1 | grep Tibor by Tibor "TS" SchA~Xtz. This patch allows utf8 in man/pod docs. Initially it was split into two parts and sent on 2012-02-02. Resending it again (3rd time) now in merged form. If any other generalizations of $(POD2MAN) are needed it can be done in a separate patch. Current form of $(POD2MAN) is choosen to be able to easily change it if some implementation does not support utf8 or resulting output has issues with local man(1) program/macros. First, add @documentencoding in scripts/texi2pod.pl: Currently our texi2pod ignores @documentencoding even if it is set properly in *.texi files. This results in a mojibake in documents generated from qemu.pod (which is generated from qemu-doc.texi by texi2pod), because the rest of the tools assumes ASCII encoding. This patch recognizes first @documentencoding in input and places it at the beginning of output as =encoding directive. Second, run pod2man with --utf8 option to enable utf8 in manpages: This option makes no difference for manpages which contains only ascii chars. But for manpages with actual UTF8 characters (qemu docs contains these), this change allows to see real characters instead of mojibakes or substitutes. Signed-off-By: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 1bc3cb0..8d6b558 100644
--- a/Makefile
+++ b/Makefile
@@ -347,28 +347,29 @@ QMP/qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx
qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@")
+POD2MAN = pod2man --utf8
qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
$(call quiet-command, \
perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \
- pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
+ $(POD2MAN) --section=1 --center=" " --release=" " qemu.pod > $@, \
" GEN $@")
qemu-img.1: qemu-img.texi qemu-img-cmds.texi
$(call quiet-command, \
perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \
- pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
+ $(POD2MAN) --section=1 --center=" " --release=" " qemu-img.pod > $@, \
" GEN $@")
fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi
$(call quiet-command, \
perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< fsdev/virtfs-proxy-helper.pod && \
- pod2man --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \
+ $(POD2MAN) --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \
" GEN $@")
qemu-nbd.8: qemu-nbd.texi
$(call quiet-command, \
perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \
- pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
+ $(POD2MAN) --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
" GEN $@")
dvi: qemu-doc.dvi qemu-tech.dvi