Debian Codegraph @

doc/rst/meson.build

raw
1 top_source_dir = meson.current_source_dir() + '/../../'
2
3 want_docs = get_option('docs')
4
5 if want_docs != 'false'
6 want_docs_build = get_option('docs-build')
7 rstdir = get_option('rstdir')
8 if want_docs_build
9 kernel_doc = find_program(top_source_dir + 'scripts/kernel-doc')
10
11 rst_conf = configuration_data()
12 rst_conf.set('SYSCONFDIR', sysconfdir)
13
14 if want_docs == 'all' or want_docs == 'rst' or want_docs == 'html'
15 foreach apif : api_files
16 afile = files(top_source_dir + 'src/nvme/' + apif)
17 subst = configure_file(
18 input: afile,
19 output: '@[email protected]',
20 configuration: rst_conf)
21 rst = custom_target(
22 apif.underscorify() + '_rst',
23 input: subst,
24 output: '@[email protected]',
25 capture: true,
26 command: [kernel_doc,
27 '-rst',
28 '@INPUT@'],
29 install: true,
30 install_dir: rstdir)
31 endforeach
32 endif
33 else
34 # no prebuild docs
35 endif
36 endif