Documentation: Fix man page breakage with DocBook XSL v1.72
From version 1.72 it will replace all dots in roff requests with U+2302 ("house" character), and add escaping in output for all instances of dot that are not in roff requests. This caused the ".ft" hack forcing monospace font in listingblocks to end up as "\&.ft" and being visible in the resulting man page. The fix adds a DOCBOOK_XSL_172 build variable that will disable the hack. To allow this variable to be defined in config.mak it also moves build variable handling below the inclusion of config.mak. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonas Fonseca committed
Nov 14, 2007 at 10:38 UTC
7f55cf451c9e7c35cad2efcd0bb7bbd7c7ae29ac
3 files changed
+12
-3
Documentation/Makefile
+7
-3
@@ -37,9 +37,6 @@ man7dir=$(mandir)/man7
37
38
ASCIIDOC=asciidoc
39
ASCIIDOC_EXTRA =
40
-ifdef ASCIIDOC8
41
-ASCIIDOC_EXTRA += -a asciidoc7compatible
42
-endif
40
INSTALL?=install
41
RM ?= rm -f
42
DOC_REF = origin/man
@@ -52,6 +49,13 @@ DOCBOOK2X_TEXI=docbook2x-texi
49
-include ../config.mak.autogen
50
-include ../config.mak
51
52
+ifdef ASCIIDOC8
53
+ASCIIDOC_EXTRA += -a asciidoc7compatible
54
+endif
55
+ifdef DOCBOOK_XSL_172
56
+ASCIIDOC_EXTRA += -a docbook-xsl-172
57
+endif
58
+
59
#
60
# Please note that there is a minor bug in asciidoc.
61
# The version after 6.0.3 _will_ include the patch found here:
Documentation/asciidoc.conf
+3
@@ -23,7 +23,9 @@ ifdef::backend-docbook[]
23
endif::backend-docbook[]
24
25
ifdef::backend-docbook[]
26
+ifndef::docbook-xsl-172[]
27
# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
28
+# v1.72 breaks with this because it replaces dots not in roff requests.
29
[listingblock]
30
<example><title>{title}</title>
31
<literallayout>
@@ -36,6 +38,7 @@ ifdef::doctype-manpage[]
38
endif::doctype-manpage[]
39
</literallayout>
40
{title#}</example>
41
+endif::docbook-xsl-172[]
42
endif::backend-docbook[]
43
44
ifdef::doctype-manpage[]
Makefile
+2
@@ -109,6 +109,8 @@ all::
109
#
110
# Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8
111
#
112
+# Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72.
113
+#
114
# Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
115
# MakeMaker (e.g. using ActiveState under Cygwin).
116
#