Skip to content

Commit e33cc17

Browse files
committed
doc/meson: provide a full-path version of api_files
We currently expand api_files into their full paths when constructing the manpage build rules. However, we'll want to use this same set of paths for a future change, so provide an expanded version of the array globally. Signed-off-by: Jeremy Kerr <[email protected]>
1 parent e99b63e commit e33cc17

1 file changed

Lines changed: 26 additions & 23 deletions

File tree

doc/meson.build

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ api_files = [
2020
'util.h'
2121
]
2222

23+
api_paths = []
24+
foreach f: api_files
25+
api_paths += files('../src/nvme/' + f)
26+
endforeach
27+
2328
sphinx_sources = [
2429
'conf.py',
2530
'api.rst',
@@ -51,29 +56,27 @@ if want_docs != 'false'
5156
mandir = join_paths(get_option('mandir'), 'man2')
5257
list_man_pages = find_program('list-man-pages.sh')
5358
if want_docs_build
54-
foreach apif : api_files
55-
foreach file : files('../src/nvme/' + apif)
56-
subst = configure_file(
57-
input: file,
58-
output: '@[email protected]',
59-
configuration: conf)
60-
c = run_command(list_man_pages, subst)
61-
man_pages = c.stdout().split()
62-
foreach page : man_pages
63-
custom_target(
64-
page.underscorify() + '_man',
65-
input: subst,
66-
output: page + '.2',
67-
capture: true,
68-
command: [kernel_doc,
69-
'-module', 'libnvme',
70-
'-man',
71-
'-function',
72-
page,
73-
subst],
74-
install: true,
75-
install_dir: mandir)
76-
endforeach
59+
foreach apif : api_paths
60+
subst = configure_file(
61+
input: file,
62+
output: '@[email protected]',
63+
configuration: conf)
64+
c = run_command(list_man_pages, subst)
65+
man_pages = c.stdout().split()
66+
foreach page : man_pages
67+
custom_target(
68+
page.underscorify() + '_man',
69+
input: subst,
70+
output: page + '.2',
71+
capture: true,
72+
command: [kernel_doc,
73+
'-module', 'libnvme',
74+
'-man',
75+
'-function',
76+
page,
77+
subst],
78+
install: true,
79+
install_dir: mandir)
7780
endforeach
7881
endforeach
7982
else

0 commit comments

Comments
 (0)