[PATCH 03/32] docs: switch building of rst files to a dictionary

Peter Krempa pkrempa at redhat.com
Thu Jul 23 13:21:08 UTC 2020


Prepare for adding per-file properties.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 docs/meson.build | 46 +++++++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 21 deletions(-)

diff --git a/docs/meson.build b/docs/meson.build
index c70669e071..001b1fe6f0 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -108,25 +108,29 @@ docs_html_in_files = [
   'windows',
 ]

+
+# docs_rst_files:
+#   each entry is a dictionary with following items:
+#   name - base file name (required)
 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',
+  { 'name': 'advanced-tests' },
+  { 'name': 'best-practices' },
+  { 'name': 'ci' },
+  { 'name': 'coding-style' },
+  { 'name': 'committer-guidelines' },
+  { 'name': 'daemons' },
+  { 'name': 'developer-tooling' },
+  { 'name': 'formatbackup' },
+  { 'name': 'formatcheckpoint' },
+  { 'name': 'hacking' },
+  { 'name': 'libvirt-go' },
+  { 'name': 'libvirt-go-xml' },
+  { 'name': 'newreposetup' },
+  { 'name': 'pci-addresses' },
+  { 'name': 'platforms' },
+  { 'name': 'programming-languages' },
+  { 'name': 'styleguide' },
+  { 'name': 'submitting-patches' },
 ]

 # list of web targets to build for docs/web rule
@@ -206,10 +210,10 @@ foreach name : docs_html_in_files
   }
 endforeach

-foreach name : docs_rst_files
-  rst_file = '@0 at .rst'.format(name)
+foreach data : docs_rst_files
+  rst_file = '@0 at .rst'.format(data['name'])
   docs_html_in_gen += {
-    'name': name,
+    'name': data['name'],
     'file': docs_rst2html_gen.process(rst_file),
   }
 endforeach
-- 
2.26.2




More information about the libvir-list mailing list