2019-10-19 22:09:52 +02:00
|
|
|
sh = find_program('sh', native: true)
|
|
|
|
|
|
2020-09-24 16:44:26 +02:00
|
|
|
scdoc = dependency('scdoc', native: true)
|
2019-08-11 20:54:28 +02:00
|
|
|
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
|
|
|
|
|
|
2020-08-27 20:02:30 +02:00
|
|
|
foreach man_src : [{'name': 'foot', 'section' : 1},
|
|
|
|
|
{'name': 'foot.ini', 'section': 5},
|
2021-01-09 13:05:19 +01:00
|
|
|
{'name': 'footclient', 'section': 1},
|
|
|
|
|
{'name': 'foot-ctlseqs', 'section': 5}]
|
2020-08-27 20:02:30 +02:00
|
|
|
name = man_src['name']
|
|
|
|
|
section = man_src['section']
|
2019-08-11 20:54:28 +02:00
|
|
|
out = '@0@.@1@'.format(name, section)
|
|
|
|
|
|
|
|
|
|
custom_target(
|
|
|
|
|
out,
|
|
|
|
|
output: out,
|
2020-08-27 21:22:27 +02:00
|
|
|
input: '@0@.@1@.scd'.format(name, section),
|
2019-08-11 20:54:28 +02:00
|
|
|
command: [sh, '-c', '@0@ < @INPUT@'.format(scdoc_prog.path())],
|
|
|
|
|
capture: true,
|
|
|
|
|
install: true,
|
|
|
|
|
install_dir: join_paths(get_option('mandir'), 'man@0@'.format(section)))
|
|
|
|
|
endforeach
|