Add spanish translator to AUTHORS file
[jack_mixer.git] / docs / meson.build
blob0c9ee36b4ef746c1669619180faa8c24b61b7398
1 if get_option('gui').enabled()
2     fs = import('fs')
4     jack_mixer_man = 'jack_mixer.1'
5     jack_mix_box_man = 'jack_mix_box.1'
7     rst2man = find_program('rst2man', 'rst2man.py', required: false)
9     if fs.exists(jack_mixer_man)
10         install_man(jack_mixer_man)
11     elif rst2man.found()
12         jack_mixer_man_rst_in = 'jack_mixer.1.rst.in'
14         jack_mixer_man_rst = configure_file(
15             input: jack_mixer_man_rst_in,
16             output: 'jack_mixer.1.rst',
17             configuration: {
18                 'VERSION': meson.project_version()
19             }
20         )
22         jack_mixer_troff = custom_target(
23             'jack_mixer_rst2man',
24             output: jack_mixer_man,
25             input: jack_mixer_man_rst,
26             command: [rst2man, '@INPUT@', '@OUTPUT@'],
27             install: true,
28             install_dir: join_paths(get_option('mandir'), 'man1')
29         )
30     else
31         error('Pre-generated file \'@0@\' and \'rst2man\' not found.\n'.format(jack_mixer_man) +
32               'Please install \'docutils\' from https://pypi.org/project/docutils.')
33     endif
35     if fs.exists(jack_mix_box_man)
36         install_man(jack_mix_box_man)
37     elif rst2man.found()
38         jack_mix_box_man_rst_in = 'jack_mix_box.1.rst.in'
40         jack_mix_box_man_rst = configure_file(
41             input: jack_mix_box_man_rst_in,
42             output: 'jack_mix_box.1.rst',
43             configuration: {
44                 'VERSION': meson.project_version()
45             }
46         )
48         jack_mix_box_troff = custom_target(
49             'jack_mix_box_rst2man',
50             output: jack_mix_box_man,
51             input: jack_mix_box_man_rst,
52             command: [rst2man, '@INPUT@', '@OUTPUT@'],
53             install: true,
54             install_dir: join_paths(get_option('mandir'), 'man1')
55         )
56     endif
58     meson.add_dist_script('meson_dist_rst2man.py', jack_mixer_man, jack_mix_box_man)
59 endif