mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
docs: meson.build: Generate HTML files directly by meson
Since we no longer reformat the XSLT-transformed files, there's no need to use an external script any more. Unfortunately this hid errors from 'xsltproc' as return value was not checked and the stderr was piped into xmllints stdin. The result was that any invalid input file would result into an empty output file. Since the script's only purpose was to prevent additional temporary files at the time we were reformatting the output in a pipeline we no longer need this. Moving the generation directly into the meson definition makes it more obvious what's happening and saves readers from having to parse what's going on. A free bonus is that errors are now properly caught and reported. This patch converts the main docs/ directory for now with cleanup of other comming later. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
46b5e9a92e
commit
fa84e3c46a
@ -267,20 +267,17 @@ foreach data : docs_html_in_gen
|
|||||||
input: data['file'],
|
input: data['file'],
|
||||||
output: html_file,
|
output: html_file,
|
||||||
command: [
|
command: [
|
||||||
meson_python_prog,
|
xsltproc_prog,
|
||||||
python3_prog.path(),
|
'--stringparam', 'pagesrc', data.get('source', ''),
|
||||||
meson_html_gen_prog.path(),
|
'--stringparam', 'builddir', meson.build_root(),
|
||||||
xsltproc_prog.path(),
|
'--stringparam', 'timestamp', docs_timestamp,
|
||||||
xmllint_prog.path(),
|
'--nonet',
|
||||||
meson.build_root(),
|
|
||||||
docs_timestamp,
|
|
||||||
site_xsl,
|
site_xsl,
|
||||||
'@INPUT@',
|
'@INPUT@',
|
||||||
'@OUTPUT@',
|
|
||||||
data.get('source', []),
|
|
||||||
],
|
],
|
||||||
depends: data.get('depends', []),
|
depends: data.get('depends', []),
|
||||||
depend_files: [ page_xsl ],
|
depend_files: [ page_xsl ],
|
||||||
|
capture: true,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: docs_html_dir,
|
install_dir: docs_html_dir,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user