Revision 3179d694
b/Makefile | ||
---|---|---|
347 | 347 |
qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx |
348 | 348 |
$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") |
349 | 349 |
|
350 |
POD2MAN = pod2man --utf8 |
|
350 | 351 |
qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi |
351 | 352 |
$(call quiet-command, \ |
352 | 353 |
perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \ |
353 |
pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
|
|
354 |
$(POD2MAN) --section=1 --center=" " --release=" " qemu.pod > $@, \
|
|
354 | 355 |
" GEN $@") |
355 | 356 |
|
356 | 357 |
qemu-img.1: qemu-img.texi qemu-img-cmds.texi |
357 | 358 |
$(call quiet-command, \ |
358 | 359 |
perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \ |
359 |
pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
|
|
360 |
$(POD2MAN) --section=1 --center=" " --release=" " qemu-img.pod > $@, \
|
|
360 | 361 |
" GEN $@") |
361 | 362 |
|
362 | 363 |
fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi |
363 | 364 |
$(call quiet-command, \ |
364 | 365 |
perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< fsdev/virtfs-proxy-helper.pod && \ |
365 |
pod2man --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \
|
|
366 |
$(POD2MAN) --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \
|
|
366 | 367 |
" GEN $@") |
367 | 368 |
|
368 | 369 |
qemu-nbd.8: qemu-nbd.texi |
369 | 370 |
$(call quiet-command, \ |
370 | 371 |
perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \ |
371 |
pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
|
|
372 |
$(POD2MAN) --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
|
|
372 | 373 |
" GEN $@") |
373 | 374 |
|
374 | 375 |
dvi: qemu-doc.dvi qemu-tech.dvi |
b/scripts/texi2pod.pl | ||
---|---|---|
36 | 36 |
$inf = ""; |
37 | 37 |
$ibase = ""; |
38 | 38 |
@ipath = (); |
39 |
$encoding = undef; |
|
39 | 40 |
|
40 | 41 |
while ($_ = shift) { |
41 | 42 |
if (/^-D(.*)$/) { |
... | ... | |
97 | 98 |
/^\@setfilename\s+([^.]+)/ and $fn = $1, next; |
98 | 99 |
/^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next; |
99 | 100 |
|
101 |
# Look for document encoding |
|
102 |
/^\@documentencoding\s+([^.]+)/ and do { |
|
103 |
$encoding = $1 unless defined $encoding; |
|
104 |
next; |
|
105 |
}; |
|
106 |
|
|
100 | 107 |
# Identify a man title but keep only the one we are interested in. |
101 | 108 |
/^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do { |
102 | 109 |
if (exists $defs{$1}) { |
... | ... | |
336 | 343 |
|
337 | 344 |
die "No filename or title\n" unless defined $fn && defined $tl; |
338 | 345 |
|
346 |
print "=encoding $encoding\n\n" if defined $encoding; |
|
347 |
|
|
339 | 348 |
$sects{NAME} = "$fn \- $tl\n"; |
340 | 349 |
$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES}; |
341 | 350 |
|
Also available in: Unified diff