Skip to content

Commit 96b8b8b

Browse files
committed
Create INSTALL file using Pandoc
Replace using lynx with using pandoc. Pandoc creates better looking output and it avoids the delicate locale/encoding issues of lynx because it always uses UTF-8 for both input and output. Note: requires Pandoc >=1.13 Discussion: https://www.postgresql.org/message-id/flat/[email protected]/ Reviewed-by: Mi Tar <[email protected]>
1 parent ff85306 commit 96b8b8b

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

doc/src/sgml/Makefile

+3-11
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,10 @@ errcodes-table.sgml: $(top_srcdir)/src/backend/utils/errcodes.txt generate-errco
100100
##
101101

102102
ICONV = iconv
103-
LYNX = lynx
104-
105-
# The documentation may contain non-ASCII characters (mostly for
106-
# contributor names), which lynx converts to the encoding determined
107-
# by the current locale. To get text output that is deterministic and
108-
# easily readable by everyone, we make lynx produce LATIN1 and then
109-
# convert that to ASCII with transliteration for the non-ASCII characters.
110-
# Official releases were historically built on FreeBSD, which has limited
111-
# locale support and is very picky about locale name spelling. The
112-
# below has been finely tuned to run on FreeBSD and Linux/glibc.
103+
PANDOC = pandoc
104+
113105
INSTALL: % : %.html
114-
$(PERL) -p -e 's,<h(1|2) class="title",<h\1 align=center,g' $< | LC_ALL=en_US.ISO8859-1 $(LYNX) -force_html -dump -nolist -stdin | $(ICONV) -f latin1 -t us-ascii//TRANSLIT > $@
106+
$(PANDOC) $< -t plain | $(ICONV) -f utf8 -t us-ascii//TRANSLIT > $@
115107

116108
INSTALL.html: %.html : stylesheet-text.xsl %.xml
117109
$(XMLLINT) --noout --valid $*.xml

doc/src/sgml/docguide.sgml

+3-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,9 @@ ADDITIONAL_FLAGS='-Xmx1500m'
358358
corresponds to <xref linkend="installation"/>, with some minor
359359
changes to account for the different context. To recreate the
360360
file, change to the directory <filename>doc/src/sgml</filename>
361-
and enter <userinput>make INSTALL</userinput>.
361+
and enter <userinput>make INSTALL</userinput>. Building text output
362+
requires <productname>Pandoc</productname> version 1.13 or newer as an
363+
additional build tool.
362364
</para>
363365

364366
<para>

0 commit comments

Comments
 (0)