mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
docs/internals/meson.build: Use template code for XSLT processing
Replace the reimplementation of the XSLT processing custom target with an identical copy form docs/meson.build and a comment to keep them in sync. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
4ced77a309
commit
80c927b6f9
@ -5,33 +5,48 @@ internals_in_files = [
|
|||||||
'rpc',
|
'rpc',
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach name : internals_in_files
|
html_xslt_gen_xslt = subsite_xsl
|
||||||
html_in_file = '@0@.html.in'.format(name)
|
html_xslt_gen_install_dir = docs_html_dir / 'internals'
|
||||||
html_file = '@0@.html'.format(name)
|
html_xslt_gen = []
|
||||||
|
|
||||||
out_file = custom_target(
|
foreach name : internals_in_files
|
||||||
html_file,
|
html_xslt_gen += {
|
||||||
input: html_in_file,
|
'name': name,
|
||||||
output: html_file,
|
'source': 'docs/internals' / name + '.html.in',
|
||||||
|
}
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
# keep the XSLT processing code block in sync with docs/meson.build
|
||||||
|
|
||||||
|
# --- begin of XSLT processing ---
|
||||||
|
|
||||||
|
foreach data : html_xslt_gen
|
||||||
|
html_filename = data['name'] + '.html'
|
||||||
|
|
||||||
|
html_file = custom_target(
|
||||||
|
html_filename,
|
||||||
|
input: data.get('file', data['name'] + '.html.in'),
|
||||||
|
output: html_filename,
|
||||||
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(),
|
html_xslt_gen_xslt,
|
||||||
docs_timestamp,
|
|
||||||
subsite_xsl,
|
|
||||||
'@INPUT@',
|
'@INPUT@',
|
||||||
'@OUTPUT@',
|
|
||||||
'docs/internals' / html_in_file,
|
|
||||||
],
|
],
|
||||||
depends: [ aclperms_gen ],
|
depends: data.get('depends', []),
|
||||||
depend_files: [ page_xsl ],
|
depend_files: [ page_xsl ],
|
||||||
|
capture: true,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: docs_html_dir / 'internals',
|
install_dir: html_xslt_gen_install_dir,
|
||||||
)
|
)
|
||||||
|
|
||||||
install_web_deps += out_file
|
install_web_deps += html_file
|
||||||
install_web_files += '@0@:@1@'.format(out_file.full_path(), docs_html_dir / 'internals')
|
install_web_files += html_file.full_path() + ':' + html_xslt_gen_install_dir
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
html_xslt_gen = []
|
||||||
|
|
||||||
|
# --- end of XSLT processing ---
|
||||||
|
Loading…
Reference in New Issue
Block a user