| 1 |
mans = ['picom.1', 'picom-inspect.1', 'picom-trans.1'] |
| 2 |
if get_option('with_docs') |
| 3 |
a2x = find_program('asciidoctor') |
| 4 |
foreach m : mans |
| 5 |
custom_target( |
| 6 |
m, |
| 7 |
output: [m], |
| 8 |
input: [m + '.adoc'], |
| 9 |
command: [ |
| 10 |
a2x, |
| 11 |
'-a', 'picom-version=v' + meson.project_version(), |
| 12 |
'--backend', 'manpage', |
| 13 |
'@INPUT@', |
| 14 |
'-D', meson.current_build_dir(), |
| 15 |
], |
| 16 |
install: true, |
| 17 |
install_dir: join_paths(get_option('mandir'), 'man1'), |
| 18 |
) |
| 19 |
custom_target( |
| 20 |
m + '.html', |
| 21 |
output: [m + '.html'], |
| 22 |
input: [m + '.adoc'], |
| 23 |
command: [ |
| 24 |
a2x, |
| 25 |
'-a', 'picom-version=v' + meson.project_version(), |
| 26 |
'--backend', 'html', |
| 27 |
'@INPUT@', |
| 28 |
'-D', meson.current_build_dir(), |
| 29 |
], |
| 30 |
install_dir: get_option('datadir') / 'doc' / 'picom', |
| 31 |
) |
| 32 |
endforeach |
| 33 |
endif |