doc: make DocBook validation optional

It turns out that changes in the building environment, the version of
Doxygen being a prime suspect, can break the validation. Invalid DocBook
XML does lead to likely broken documentation, but perhaps it is better
than failing to build or having to disable documentation completely.

CI turns DocBook validation on, because the CI environment is stable and
known, and we do want to catch mistakes in hand-written DocBook files.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2026-01-29 11:57:29 +02:00 committed by Simon Ser
parent dbf45d11a3
commit e12bbe4969
3 changed files with 11 additions and 2 deletions

View file

@ -94,11 +94,16 @@ foreach src : files([
)
endforeach
skip_validation = '--skip-validation'
if get_option('docbook_validation')
skip_validation = []
endif
custom_target(
'Wayland-docbook-html',
command: [
xmlto,
'--skip-validation',
skip_validation,
'--stringparam', 'chunker.output.encoding=UTF-8',
'--stringparam', 'chunk.section.depth=0',
'--stringparam', 'toc.section.depth=1',