2021-03-04 00:56:37 +00:00
|
|
|
pandoc = find_program('pandoc', required: get_option('man-pages'))
|
2020-07-22 21:58:27 +01:00
|
|
|
|
2020-09-02 21:09:38 +01:00
|
|
|
sections = ['.1', '-config.5', '-theme.5', '-actions.5']
|
2020-07-22 21:58:27 +01:00
|
|
|
|
|
|
|
|
if pandoc.found()
|
|
|
|
|
foreach s : sections
|
2020-09-02 21:09:38 +01:00
|
|
|
markdown = files('labwc' + s + '.md')
|
|
|
|
|
manpage = 'labwc' + s
|
2020-07-22 21:58:27 +01:00
|
|
|
custom_target(
|
|
|
|
|
manpage,
|
|
|
|
|
command: [pandoc,'-s','-t','man',markdown],
|
|
|
|
|
output: manpage,
|
|
|
|
|
capture: true,
|
|
|
|
|
install: true,
|
2021-03-04 06:21:45 +00:00
|
|
|
install_dir: join_paths(get_option('mandir'), 'man' + s.split('.')[-1])
|
2020-07-22 21:58:27 +01:00
|
|
|
)
|
|
|
|
|
endforeach
|
|
|
|
|
endif
|