1
0
Fork 0
libnvme/doc/rst/meson.build
Daniel Baumann a02d194ad0
Merging upstream version 1.10.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-16 10:50:54 +01:00

36 lines
1 KiB
Meson

top_source_dir = meson.current_source_dir() + '/../../'
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(top_source_dir + 'scripts/kernel-doc')
rst_conf = configuration_data()
rst_conf.set('SYSCONFDIR', sysconfdir)
if want_docs == 'all' or want_docs == 'rst' or want_docs == 'html'
foreach apif : api_files
afile = files(top_source_dir + 'src/nvme/' + apif)
subst = configure_file(
input: afile,
output: '@BASENAME@.subst',
configuration: rst_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
# no prebuild docs
endif
endif