forked from eclipse-bluechi/bluechi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
52 lines (46 loc) · 1.15 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#
# Copyright Contributors to the Eclipse BlueChi project
#
# SPDX-License-Identifier: LGPL-2.1-or-later
want_man = get_option('with_man_pages')
md2man = find_program('go-md2man', required : false)
if want_man and not md2man.found()
message('go-md2man not found, man page generation disabled automatically')
endif
want_man = want_man and md2man.found()
man1 = [
'bluechi-controller',
'bluechi-agent',
'bluechictl',
'bluechi-proxy',
'bluechi-is-online',
]
man5 = [
'bluechi-controller.conf',
'bluechi-agent.conf',
]
man8 = [
'bluechi-controller-selinux',
'bluechi-agent-selinux'
]
if want_man
foreach pair : [[man1, '1'], [man5, '5'], [man8, '8']]
pages = pair[0]
section = pair[1]
foreach man : pages
custom_target(
man + '.' + section,
input : [man + '.' + section + '.md'],
output : [man + '.' + section],
command : [
md2man,
'-in', '@INPUT@',
'-out', '@OUTPUT@',
],
build_by_default : true,
install : true,
install_dir : get_option('mandir') / ('man' + section),
)
endforeach
endforeach
endif