summaryrefslogtreecommitdiffstats
path: root/doc/rst/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-26 05:25:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-26 05:34:52 +0000
commit9ecff41dd11e920286f9be670a0ec3a668371d1d (patch)
tree89c73ab6742847ca5f12056e6c0dd4ec6bbe79d0 /doc/rst/meson.build
parentAdding debian version 1.0-1. (diff)
downloadlibnvme-9ecff41dd11e920286f9be670a0ec3a668371d1d.tar.xz
libnvme-9ecff41dd11e920286f9be670a0ec3a668371d1d.zip
Merging upstream version 1.1~rc0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/rst/meson.build')
-rw-r--r--doc/rst/meson.build36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/rst/meson.build b/doc/rst/meson.build
new file mode 100644
index 0000000..43874f0
--- /dev/null
+++ b/doc/rst/meson.build
@@ -0,0 +1,36 @@
+want_docs = get_option('docs')
+
+if want_docs != 'false'
+ want_docs_build = get_option('docs-build')
+ rstdir = get_option('rstdir')
+ if want_docs_build
+ kernel_doc = find_program('../kernel-doc')
+
+ conf = configuration_data()
+ conf.set('SYSCONFDIR', sysconfdir)
+
+ if want_docs == 'all' or want_docs == 'rst' or want_docs == 'html'
+ foreach apif : api_files
+ afile = files('../../src/nvme/' + apif)
+ subst = configure_file(
+ input: afile,
+ output: '@BASENAME@.subst',
+ configuration: conf)
+ rst = custom_target(
+ apif.underscorify() + '_rst',
+ input: subst,
+ output: '@BASENAME@.rst',
+ capture: true,
+ command: [kernel_doc,
+ '-rst',
+ '@INPUT@'],
+ install: true,
+ install_dir: rstdir)
+ endforeach
+ endif
+ else
+ if want_docs == 'all' or want_docs == 'rst'
+ install_subdir('rst', install_dir: rstdir)
+ endif
+ endif
+endif