[libvirt PATCH 330/351] meson: docs/html: generate admin, lxc and qemu API documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 docs/Makefile.am      | 43 -------------------------------------------
 docs/html/meson.build | 26 ++++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 43 deletions(-)

diff --git a/docs/Makefile.am b/docs/Makefile.am
index 7c30d75b997..9e3479f010e 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -16,10 +16,6 @@
 ## License along with this library.  If not, see
 ## <http://www.gnu.org/licenses/>.
 
-modules_admin = libvirt-admin
-modules_qemu = libvirt-qemu
-modules_lxc = libvirt-lxc
-
 all: vpathhack
 
 # This hack enables us to view the web pages
@@ -30,33 +26,6 @@ vpathhack:
 	  test -e $$dir || ln -s $(srcdir)/$$dir $$dir ; \
 	done
 
-apiadminhtml = \
-  html/index-admin.html \
-  $(apiadminhtml_generated)
-
-apiadminhtml_generated = \
-	$(addprefix html/libvirt-,$(addsuffix .html,$(modules_admin))) \
-	$(NULL)
-
-apiqemuhtml = \
-  html/index-qemu.html \
-  $(apiqemuhtml_generated)
-
-apiqemuhtml_generated = \
-	$(addprefix html/libvirt-,$(addsuffix .html,$(modules_qemu))) \
-	$(NULL)
-
-apilxchtml = \
-  html/index-lxc.html \
-  $(apilxchtml_generated)
-
-apilxchtml_generated = \
-	$(addprefix html/libvirt-,$(addsuffix .html,$(modules_lxc))) \
-	$(NULL)
-
-apirefdir = $(HTML_DIR)/html
-apiref_DATA = $(apihtml) $(apiadminhtml) $(apiqemuhtml) $(apilxchtml)
-
 javascript = \
   js/main.js \
   $(NULL)
@@ -235,18 +204,6 @@ manpages/%.html.in: manpages/%.rst
 	     -e 's|RUNSTATEDIR|$(runstatedir)|g' | \
 	  $(RST2HTML) --strict > $@ || { rm $@ && exit 1; }
 
-$(apihtml_generated): html/index.html
-$(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) \
-	  --stringparam indexfile $(@:html/%=%) \
-	  $(srcdir)/newapi.xsl $<
-
 check-html:
 	$(XMLLINT) --nonet --noout html/*.html
 
diff --git a/docs/html/meson.build b/docs/html/meson.build
index 67356c7d657..7be5abe5fe5 100644
--- a/docs/html/meson.build
+++ b/docs/html/meson.build
@@ -42,3 +42,29 @@ custom_target(
     page_xsl,
   ],
 )
+
+foreach name : [ 'admin', 'lxc', 'qemu' ]
+  custom_target(
+    'index-@0@-api'.format(name),
+    input: [
+      newapi_xsl,
+      get_variable('docs_@0@_api_xml'.format(name)),
+    ],
+    output: [
+      'index-@0@.html'.format(name),
+      'libvirt-libvirt-@0@.html'.format(name),
+    ],
+    command: [
+      xsltproc_prog, '--nonet', '-o', docs_builddir,
+      '--stringparam', 'builddir', meson.build_root(),
+      '--stringparam', 'timestamp', docs_timestamp,
+      '--stringparam', 'indexfile', 'index-@0@.html'.format(name),
+      '@INPUT@',
+    ],
+    install: true,
+    install_dir: docs_html_dir / 'html',
+    depend_files: [
+      page_xsl,
+    ],
+  )
+endforeach
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux