]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docs: kbase: Section of 'internals' documents into a subfolder
authorPeter Krempa <pkrempa@redhat.com>
Tue, 5 Apr 2022 11:27:42 +0000 (13:27 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 12 Apr 2022 10:53:32 +0000 (12:53 +0200)
Add an 'internals' subfolder to 'docs/kbase' to house all the documents
under internals. The output files are still under 'docs/kbase'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
docs/kbase/index.rst
docs/kbase/internals/incremental-backup.rst [moved from docs/kbase/incrementalbackupinternals.rst with 100% similarity]
docs/kbase/internals/meson.build [new file with mode: 0644]
docs/kbase/internals/migration.rst [moved from docs/kbase/migrationinternals.rst with 100% similarity]
docs/kbase/meson.build

index 4e18acd4d9848242611f876edfcd249f8a789055..c6748e8883b43f4e4b2f2317bbe2652b2fc9aea8 100644 (file)
@@ -79,9 +79,9 @@ Debugging
 Internals
 ---------
 
-`Incremental backup internals <incrementalbackupinternals.html>`__
+`Incremental backup internals <internals/incremental-backup.html>`__
    Incremental backup implementation details relevant for users
 
-`VM migration internals <migrationinternals.html>`__
+`VM migration internals <internals/migration.html>`__
    VM migration implementation details, complementing the info in
    `migration <../migration.html>`__
diff --git a/docs/kbase/internals/meson.build b/docs/kbase/internals/meson.build
new file mode 100644 (file)
index 0000000..923e262
--- /dev/null
@@ -0,0 +1,55 @@
+docs_kbase_internals_files = [
+  'incremental-backup',
+  'migration',
+]
+
+
+html_xslt_gen_install_dir = docs_html_dir / 'kbase' / 'internals'
+html_xslt_gen = []
+
+foreach name : docs_kbase_internals_files
+  rst_file = '@0@.rst'.format(name)
+
+  html_xslt_gen += {
+    'name': name,
+    'file': docs_rst2html5_gen.process(rst_file),
+    'source': 'docs' / 'kbase' / 'internals' / rst_file,
+    'href_base': '../../',
+  }
+endforeach
+
+# keep the XSLT processing code block in sync with docs/meson.build
+
+# --- begin of XSLT processing ---
+
+foreach data : html_xslt_gen
+  html_filename = data['name'] + '.html'
+
+  html_file = custom_target(
+    html_filename,
+    input: data.get('file', data['name'] + '.html.in'),
+    output: html_filename,
+    command: [
+      xsltproc_prog,
+      '--stringparam', 'pagesrc', data.get('source', ''),
+      '--stringparam', 'builddir', meson.build_root(),
+      '--stringparam', 'timestamp', docs_timestamp,
+      '--stringparam', 'href_base', data.get('href_base', ''),
+      '--nonet',
+      site_xsl,
+      '@INPUT@',
+    ],
+    depends: data.get('depends', []),
+    depend_files: [ page_xsl ],
+    capture: true,
+    install: true,
+    install_dir: html_xslt_gen_install_dir,
+  )
+
+  install_web_deps += html_file
+  install_web_files += html_file.full_path() + ':' + html_xslt_gen_install_dir
+endforeach
+
+html_xslt_gen = []
+
+# --- end of XSLT processing ---
index e37feb6d30c68308080c6c766c856e095256004b..269bf64a94a7d8ddb7dd74ac00cd381dae9cdc06 100644 (file)
@@ -2,7 +2,6 @@ docs_kbase_files = [
   'backing_chains',
   'debuglogs',
   'domainstatecapture',
-  'incrementalbackupinternals',
   'index',
   'kvm-realtime',
   'launch_security_sev',
@@ -12,7 +11,6 @@ docs_kbase_files = [
   'locking-sanlock',
   'memorydevices',
   'merging_disk_image_chains',
-  'migrationinternals',
   'qemu-core-dump',
   'qemu-passthrough-security',
   'rpm-deployment',
@@ -73,3 +71,5 @@ endforeach
 html_xslt_gen = []
 
 # --- end of XSLT processing ---
+
+subdir('internals')