diff options
| author | Andrew Dunstan <andrew@dunslane.net> | 2025-10-06 07:53:31 -0400 |
|---|---|---|
| committer | Andrew Dunstan <andrew@dunslane.net> | 2025-10-06 07:53:31 -0400 |
| commit | 5b5e8a29c13aa583f8a674cb65f92a204da24be8 (patch) | |
| tree | ab0400fda8597844d932d557b67243bc396a9f09 /doc/src/sgml/Makefile | |
| parent | b93172ca59f4ae317b2b9dfbf7f342b237101256 (diff) | |
Revert "Improve docs syntax checking"
This reverts commit b292256272623d1a7532f3893a4565d1944742b4.
Further discussion is needed
Discussion: https://postgr.es/m/0198ec0f-0269-4cf4-b4a7-22c05b3047cb@eisentraut.org
Diffstat (limited to 'doc/src/sgml/Makefile')
| -rw-r--r-- | doc/src/sgml/Makefile | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index 4d45b805da2..b53b2694a6b 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -124,7 +124,7 @@ ifeq ($(STYLE),website) XSLTPROC_HTML_FLAGS += --param website.stylesheet 1 endif -html: check html-stamp +html: html-stamp html-stamp: stylesheet.xsl postgres-full.xml $(ALL_IMAGES) $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $(wordlist 1,2,$^) @@ -200,8 +200,8 @@ MAKEINFO = makeinfo ## # Quick syntax check without style processing -check: postgres.sgml $(ALL_SGML) - $(PERL) $(srcdir)/sgml_syntax_check.pl --xmllint "$(XMLLINT)" --srcdir $(srcdir) +check: postgres.sgml $(ALL_SGML) check-tabs check-nbsp + $(XMLLINT) $(XMLINCLUDE) --noout --valid $< ## @@ -261,6 +261,18 @@ clean-man: endif # sqlmansectnum != 7 +# tabs are harmless, but it is best to avoid them in SGML files +check-tabs: + @( ! grep ' ' $(wildcard $(srcdir)/*.sgml $(srcdir)/func/*.sgml $(srcdir)/ref/*.sgml $(srcdir)/*.xsl) ) || \ + (echo "Tabs appear in SGML/XML files" 1>&2; exit 1) + +# Non-breaking spaces are harmless, but it is best to avoid them in SGML files. +# Use perl command because non-GNU grep or sed could not have hex escape sequence. +check-nbsp: + @ ( $(PERL) -ne '/\xC2\xA0/ and print("$$ARGV:$$_"),$$n++; END {exit($$n>0)}' \ + $(wildcard $(srcdir)/*.sgml $(srcdir)/func/*.sgml $(srcdir)/ref/*.sgml $(srcdir)/*.xsl $(srcdir)/images/*.xsl) ) || \ + (echo "Non-breaking spaces appear in SGML/XML files" 1>&2; exit 1) + ## ## Clean ## |
