[libvirt PATCH 326/351] meson: docs: build news.html from news.xml

Pavel Hrdina phrdina at redhat.com
Thu Jul 16 09:59:22 UTC 2020


Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 docs/Makefile.am | 15 ---------------
 docs/meson.build |  6 ++++++
 2 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/docs/Makefile.am b/docs/Makefile.am
index 73d3d26422a..1a5ae23b0ae 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -277,17 +277,6 @@ manpages/virkeyname-%.rst: $(top_srcdir)/src/keycodemapdb/data/keymaps.csv \
 manpagesdir = $(HTML_DIR)/manpages
 manpages_DATA = $(manpages_html)
 
-dot_rst_html_in = \
-  news.html.in \
-  $(NULL)
-dot_html = \
-  $(dot_html_generated_in:%.html.in=%.html) \
-  $(dot_html_in:%.html.in=%.html) \
-  $(dot_rst_html_in:%.html.in=%.html)
-
-htmldir = $(HTML_DIR)
-html_DATA = $(dot_html)
-
 schemadir = $(pkgdatadir)/schemas
 schema_DATA = $(wildcard $(srcdir)/schemas/*.rng)
 
@@ -298,10 +287,6 @@ manpages/%.html.in: manpages/%.rst
 	     -e 's|RUNSTATEDIR|$(runstatedir)|g' | \
 	  $(RST2HTML) --strict > $@ || { rm $@ && exit 1; }
 
-news.html.in: $(top_srcdir)/NEWS.rst
-	$(AM_V_GEN)$(MKDIR_P) `dirname $@` && \
-	  $(RST2HTML) --strict $< > $@ || { rm $@ && exit 1; }
-
 $(apihtml_generated): html/index.html
 $(apiadminhtml_generated): html/index-admin.html
 $(apiqemuhtml_generated): html/index-qemu.html
diff --git a/docs/meson.build b/docs/meson.build
index 252f16262be..463caa5e3e1 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -250,6 +250,12 @@ docs_html_in_gen += {
   'file': hvsupport_html_in,
 }
 
+news_html_in = docs_rst2html_gen.process(meson.source_root() / 'NEWS.rst')
+docs_html_in_gen += {
+  'name': 'news',
+  'file': news_html_in,
+}
+
 foreach data : docs_html_in_gen
   html_file = '@0 at .html'.format(data['name'])
 
-- 
2.26.2




More information about the libvir-list mailing list