foot/doc/meson.build
Craig Barnes 9b208f56de doc: ctlseqs: rename "foot-ctlseqs.5" man page to "foot-ctlseqs.7"
Section 5 is for "file formats and conventions", which doesn't really
apply to terminal escape sequences. Section 7 is for "miscellaneous".
2021-02-23 18:49:57 +00:00

22 lines
766 B
Meson

sh = find_program('sh', native: true)
scdoc = dependency('scdoc', native: true)
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
foreach man_src : [{'name': 'foot', 'section' : 1},
{'name': 'foot.ini', 'section': 5},
{'name': 'footclient', 'section': 1},
{'name': 'foot-ctlseqs', 'section': 7}]
name = man_src['name']
section = man_src['section']
out = '@0@.@1@'.format(name, section)
custom_target(
out,
output: out,
input: '@0@.@1@.scd'.format(name, section),
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