doc Makefile: issue warning about chars that cannot be output
authorBruce Momjian <[email protected]>
Tue, 3 Dec 2024 02:25:12 +0000 (21:25 -0500)
committerBruce Momjian <[email protected]>
Tue, 3 Dec 2024 02:25:12 +0000 (21:25 -0500)
A follow-up improvement to commit 641a5b7a144.

Reported-by: Tatsuo Ishii, Tom Lane
Discussion: https://postgr.es/m/20241126.182513.1752581942460106099[email protected]

Backpatch-through: master

doc/src/sgml/Makefile

index a04c532b53696829fcba4f22b8312ddd0aa887c3..4a08b6f433e8177ba27ea53ed1f50651660dd61a 100644 (file)
@@ -156,7 +156,9 @@ XSLTPROC_FO_FLAGS += --stringparam img.src.path '$(srcdir)/'
    $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_FO_FLAGS) --stringparam paper.type USletter -o $@ $^
 
 %.pdf: %.fo $(ALL_IMAGES)
-   $(FOP) -fo $< -pdf $@
+   LANG=C $(FOP) -fo $< -pdf $@ 2>&1 | \
+   awk 'BEGIN { warn = 0 }  { print }  /not available in font/ { warn = 1 }  \
+   END { if (warn != 0) print("\nFound characters that cannot be output in the PDF document;  see README.non-ASCII") }' 1>&2
 
 
 ##