aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2011-06-19 23:27:56 +0300
committerPeter Eisentraut <peter_e@gmx.net>2011-06-19 23:30:11 +0300
commit7ec70f46c676f2f40615cad818ecc2a975698321 (patch)
tree92f5735c648b713b015d608411d5a0a6d6f6f103
parent68306da4880401ed9fd3b341e67a5e4cd4b8706f (diff)
downloadpostgresql-7ec70f46c676f2f40615cad818ecc2a975698321.tar.gz
postgresql-7ec70f46c676f2f40615cad818ecc2a975698321.zip
Produce HISTORY file consistently as ASCII
The release notes may contain non-ASCII characters (for contributor names), which lynx converts to the encoding determined by the current locale. The get output that is deterministic and easily readable by everyone, we make lynx produce LATIN1 and then convert that to ASCII with transliteration for the non-ASCII characters.
-rw-r--r--doc/src/sgml/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index c5078a80801..e6c8a49df87 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -206,10 +206,19 @@ postgres.pdf:
##
JADE.text = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -i output-text -t sgml
+ICONV = iconv
LYNX = lynx
+# The release notes may contain non-ASCII characters (for contributor
+# names), which lynx converts to the encoding determined by the
+# current locale. The get output that is deterministic and easily
+# readable by everyone, we make lynx produce LATIN1 and then convert
+# that to ASCII with transliteration for the non-ASCII characters.
+# Official releases are currently built on FreeBSD, which has limited
+# locale support and is very picky about locale name spelling. The
+# below has been finely tuned to run on FreeBSD and Linux/glibc.
INSTALL HISTORY regress_README: % : %.html
- $(PERL) -p -e 's/<H(1|2)$$/<H\1 align=center/g' $< | $(LYNX) -force_html -dump -nolist -stdin > $@
+ $(PERL) -p -e 's/<H(1|2)$$/<H\1 align=center/g' $< | LC_ALL=en_US.ISO8859-1 $(LYNX) -force_html -dump -nolist -stdin | $(ICONV) -f latin1 -t us-ascii//TRANSLIT > $@
INSTALL.html: standalone-install.sgml installation.sgml version.sgml
$(JADE.text) -V nochunks standalone-install.sgml installation.sgml > $@