1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

Improve docs syntax checking

Move the checks out of the Makefile into a perl script that can be
called from both the Makefile and meson.build. The set of files checked
is simplified, so it is just all the sgml and xsl files found in
docs/src/sgml directory tree.

Along the way make some adjustments to .cirrus.tasks.yml to support this
better in CI.

Also ensure that the checks are part of the Makefile's html target.

Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
Co-Author: Andrew Dunstan <andrew@dunslane.net>

Discussion: https://postgr.es/m/CAN55FZ3BnM+0twT-ZWL8As9oBEte_b+SBU==cz6Hk8JUCM_5Wg@mail.gmail.com
This commit is contained in:
Andrew Dunstan
2025-09-30 15:39:15 -04:00
parent 482bc0705d
commit b292256272
4 changed files with 106 additions and 15 deletions

View File

@@ -306,3 +306,26 @@ endif
if alldocs.length() != 0
alias_target('alldocs', alldocs)
endif
sgml_syntax_check = files(
'sgml_syntax_check.pl'
)
test(
'sgml_syntax_check',
perl,
protocol: 'exitcode',
suite: 'doc',
args: [
sgml_syntax_check,
'--xmllint',
'@0@ --nonet'.format(xmllint_bin.full_path()),
'--srcdir',
meson.current_source_dir(),
'--builddir',
meson.current_build_dir(),
],
depends: doc_generated
)
testprep_targets += doc_generated