foot/doc/meson.build

19 lines
537 B
Meson
Raw Normal View History

2019-08-11 20:54:28 +02:00
scdoc = dependency('scdoc', native: true)
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
2019-08-12 20:00:09 +02:00
foreach man_src : ['foot.1.scd', 'foot.5.scd']
2019-08-11 20:54:28 +02:00
parts = man_src.split('.')
name = parts[-3]
section = parts[-2]
out = '@0@.@1@'.format(name, section)
custom_target(
out,
output: out,
input: man_src,
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