build: Don't assume that all the pages are in section 1 of the manual
This will be used by the subsequent commit to add a page to document the configuration file, which should go into section 5 of the manual. https://github.com/containers/toolbox/pull/963
This commit is contained in:
parent
59d241baa1
commit
0e78e4a313
1 changed files with 27 additions and 22 deletions
|
@ -4,28 +4,33 @@ go_md2man_command = [
|
|||
'-out', '@OUTPUT@',
|
||||
]
|
||||
|
||||
manuals = [
|
||||
'toolbox.1',
|
||||
'toolbox-create.1',
|
||||
'toolbox-enter.1',
|
||||
'toolbox-init-container.1',
|
||||
'toolbox-help.1',
|
||||
'toolbox-list.1',
|
||||
'toolbox-rm.1',
|
||||
'toolbox-rmi.1',
|
||||
'toolbox-run.1',
|
||||
]
|
||||
manuals = {
|
||||
'1': [
|
||||
'toolbox',
|
||||
'toolbox-create',
|
||||
'toolbox-enter',
|
||||
'toolbox-init-container',
|
||||
'toolbox-help',
|
||||
'toolbox-list',
|
||||
'toolbox-rm',
|
||||
'toolbox-rmi',
|
||||
'toolbox-run',
|
||||
],
|
||||
}
|
||||
|
||||
foreach manual: manuals
|
||||
input = manual + '.md'
|
||||
output = manual
|
||||
foreach section, pages: manuals
|
||||
foreach page: pages
|
||||
output = page + '.' + section
|
||||
input = output + '.md'
|
||||
sectiondir = 'man' + section
|
||||
|
||||
custom_target(
|
||||
output,
|
||||
command: go_md2man_command,
|
||||
input: input,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('mandir'), 'man1'),
|
||||
output: output,
|
||||
)
|
||||
custom_target(
|
||||
output,
|
||||
command: go_md2man_command,
|
||||
input: input,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('mandir'), sectiondir),
|
||||
output: output,
|
||||
)
|
||||
endforeach
|
||||
endforeach
|
||||
|
|
Loading…
Reference in a new issue