meson: docs/html: generate libvirt API documentation

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:
Pavel Hrdina 2020-06-18 02:28:33 +02:00
parent 033e016843
commit db9a02ccf0
3 changed files with 49 additions and 38 deletions

View File

@ -16,23 +16,6 @@
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
modules = \
libvirt-common \
libvirt-domain \
libvirt-domain-checkpoint \
libvirt-domain-snapshot \
libvirt-event \
libvirt-host \
libvirt-interface \
libvirt-network \
libvirt-nodedev \
libvirt-nwfilter \
libvirt-secret \
libvirt-storage \
libvirt-stream \
virterror \
$(NULL)
modules_admin = libvirt-admin
modules_qemu = libvirt-qemu
modules_lxc = libvirt-lxc
@ -47,14 +30,6 @@ vpathhack:
test -e $$dir || ln -s $(srcdir)/$$dir $$dir ; \
done
apihtml = \
html/index.html \
$(apihtml_generated)
apihtml_generated = \
$(addprefix html/libvirt-,$(addsuffix .html,$(modules))) \
$(NULL)
apiadminhtml = \
html/index-admin.html \
$(apiadminhtml_generated)
@ -79,14 +54,8 @@ apilxchtml_generated = \
$(addprefix html/libvirt-,$(addsuffix .html,$(modules_lxc))) \
$(NULL)
apipng = \
html/left.png \
html/up.png \
html/home.png \
html/right.png
apirefdir = $(HTML_DIR)/html
apiref_DATA = $(apihtml) $(apiadminhtml) $(apiqemuhtml) $(apilxchtml) $(apipng)
apiref_DATA = $(apihtml) $(apiadminhtml) $(apiqemuhtml) $(apilxchtml)
javascript = \
js/main.js \
@ -271,12 +240,6 @@ $(apiadminhtml_generated): html/index-admin.html
$(apiqemuhtml_generated): html/index-qemu.html
$(apilxchtml_generated): html/index-lxc.html
html/index.html: libvirt-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP)
$(AM_V_GEN)$(XSLTPROC) --nonet -o ./ \
--stringparam builddir '$(abs_top_builddir)' \
--stringparam timestamp $(timestamp) \
$(srcdir)/newapi.xsl libvirt-api.xml
html/index-%.html: libvirt-%-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP)
$(AM_V_GEN)$(XSLTPROC) --nonet -o ./ \
--stringparam builddir '$(abs_top_builddir)' \

44
docs/html/meson.build Normal file
View File

@ -0,0 +1,44 @@
apipng = [
'home.png',
'left.png',
'right.png',
'up.png',
]
install_data(apipng, install_dir: docs_html_dir / 'html')
custom_target(
'index-api',
input: [
newapi_xsl,
docs_api_xml,
],
output: [
'index.html',
'libvirt-libvirt-common.html',
'libvirt-libvirt-domain.html',
'libvirt-libvirt-domain-checkpoint.html',
'libvirt-libvirt-domain-snapshot.html',
'libvirt-libvirt-event.html',
'libvirt-libvirt-host.html',
'libvirt-libvirt-interface.html',
'libvirt-libvirt-network.html',
'libvirt-libvirt-nodedev.html',
'libvirt-libvirt-nwfilter.html',
'libvirt-libvirt-secret.html',
'libvirt-libvirt-storage.html',
'libvirt-libvirt-stream.html',
'libvirt-virterror.html',
],
command: [
xsltproc_prog, '--nonet', '-o', docs_builddir,
'--stringparam', 'builddir', meson.build_root(),
'--stringparam', 'timestamp', docs_timestamp,
'@INPUT@',
],
install: true,
install_dir: docs_html_dir / 'html',
depend_files: [
page_xsl,
],
)

View File

@ -1,5 +1,8 @@
docs_html_dir = docdir / 'html'
# xsltproc requires that the -o path ends with '/'
docs_builddir = meson.current_build_dir() / ''
docs_assets = [
'android-chrome-192x192.png',
'android-chrome-256x256.png',
@ -289,6 +292,7 @@ foreach data : docs_html_in_gen
endforeach
subdir('fonts')
subdir('html')
# This hack enables us to view the web pages