aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2015-09-27 20:09:52 -0400
committerJonathan Corbet <corbet@lwn.net>2015-09-28 03:31:48 -0400
commitb479bfd00e463034a73a9894d4f6d87988cbc559 (patch)
tree6ee8eaaf8fe73ff66da96bd980d76b3e57f45c3e /Documentation/DocBook
parentc51edfb10e6b6e8cfd1bd80ab9f54e51e55ea62a (diff)
DocBook: Use a fixed encoding for output
Currently the encoding of documents generated by DocBook depends on the current locale. Make the output reproducible independently of the locale, by setting the encoding to UTF-8 (LC_CTYPE=C.UTF-8) by preference, or ASCII (LC_CTYPE=C) as a fallback. LC_CTYPE can normally be overridden by LC_ALL, but the top-level Makefile unsets that. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> [jc: added check-lc_ctype to .gitignore] Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 93eff64387cd..d2544961b67a 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -69,6 +69,12 @@ installmandocs: mandocs
69KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref 69KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref
70KERNELDOC = $(srctree)/scripts/kernel-doc 70KERNELDOC = $(srctree)/scripts/kernel-doc
71DOCPROC = $(objtree)/scripts/docproc 71DOCPROC = $(objtree)/scripts/docproc
72CHECK_LC_CTYPE = $(objtree)/scripts/check-lc_ctype
73
74# Use a fixed encoding - UTF-8 if the C library has support built-in
75# or ASCII if not
76LC_CTYPE := $(call try-run, LC_CTYPE=C.UTF-8 $(CHECK_LC_CTYPE),C.UTF-8,C)
77export LC_CTYPE
72 78
73XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl 79XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl
74XMLTOFLAGS += --skip-validation 80XMLTOFLAGS += --skip-validation