mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-10 04:27:45 -05:00
When enabled, man pages are generated and installed, along with README.md, CHANGELOG.md and LICENSE. This requires ‘scdoc’ as a make dependency. When disabled, ‘scdoc’ is no longer required, no man pages will be built, and no documentation at all is installed. Defaults to ‘enabled’.
20 lines
665 B
Meson
20 lines
665 B
Meson
sh = find_program('sh', 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 = 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
|