mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
meson: docs: build *.html files from *.rst files
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
0eb7a86f82
commit
47b4217365
@ -281,10 +281,7 @@ manpages_DATA = $(manpages_html)
|
|||||||
dot_html_generated_in = \
|
dot_html_generated_in = \
|
||||||
hvsupport.html.in \
|
hvsupport.html.in \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
dot_rst = \
|
|
||||||
$(notdir $(wildcard $(srcdir)/*.rst))
|
|
||||||
dot_rst_html_in = \
|
dot_rst_html_in = \
|
||||||
$(dot_rst:%.rst=%.html.in) \
|
|
||||||
news.html.in \
|
news.html.in \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
dot_html = \
|
dot_html = \
|
||||||
|
@ -105,6 +105,27 @@ docs_html_in_files = [
|
|||||||
'windows',
|
'windows',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
docs_rst_files = [
|
||||||
|
'advanced-tests',
|
||||||
|
'best-practices',
|
||||||
|
'ci',
|
||||||
|
'coding-style',
|
||||||
|
'committer-guidelines',
|
||||||
|
'daemons',
|
||||||
|
'developer-tooling',
|
||||||
|
'formatbackup',
|
||||||
|
'formatcheckpoint',
|
||||||
|
'hacking',
|
||||||
|
'libvirt-go',
|
||||||
|
'libvirt-go-xml',
|
||||||
|
'newreposetup',
|
||||||
|
'pci-addresses',
|
||||||
|
'platforms',
|
||||||
|
'programming-languages',
|
||||||
|
'styleguide',
|
||||||
|
'submitting-patches',
|
||||||
|
]
|
||||||
|
|
||||||
install_data(docs_assets, install_dir: docs_html_dir)
|
install_data(docs_assets, install_dir: docs_html_dir)
|
||||||
|
|
||||||
aclperms_gen = custom_target(
|
aclperms_gen = custom_target(
|
||||||
@ -191,3 +212,46 @@ foreach name : docs_html_in_files
|
|||||||
install_dir: docs_html_dir,
|
install_dir: docs_html_dir,
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
|
||||||
|
# docs_html_in_gen:
|
||||||
|
# each entry is a dictionary with following items:
|
||||||
|
# name - base file name (required)
|
||||||
|
# file - generated file (required)
|
||||||
|
docs_html_in_gen = []
|
||||||
|
|
||||||
|
foreach name : docs_rst_files
|
||||||
|
rst_file = '@0@.rst'.format(name)
|
||||||
|
docs_html_in_gen += {
|
||||||
|
'name': name,
|
||||||
|
'file': docs_rst2html_gen.process(rst_file),
|
||||||
|
}
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
foreach data : docs_html_in_gen
|
||||||
|
html_file = '@0@.html'.format(data['name'])
|
||||||
|
rst_in_file = '@0@.rst'.format(data['name'])
|
||||||
|
|
||||||
|
custom_target(
|
||||||
|
html_file,
|
||||||
|
input: data['file'],
|
||||||
|
output: html_file,
|
||||||
|
command: [
|
||||||
|
meson_python_prog,
|
||||||
|
python3_prog.path(),
|
||||||
|
meson_html_gen_prog.path(),
|
||||||
|
xsltproc_prog.path(),
|
||||||
|
xmllint_prog.path(),
|
||||||
|
meson.build_root(),
|
||||||
|
docs_timestamp,
|
||||||
|
site_xsl,
|
||||||
|
'@INPUT@',
|
||||||
|
'@OUTPUT@',
|
||||||
|
rst_in_file,
|
||||||
|
],
|
||||||
|
depends: [ aclperms_gen ],
|
||||||
|
depend_files: [ page_xsl ],
|
||||||
|
install: true,
|
||||||
|
install_dir: docs_html_dir,
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
Loading…
Reference in New Issue
Block a user