yambar/doc/meson.build
Daniel Eklöf 6753ee3dad meson: set project version
Export project version with -DF00BAR_VERSION.

This is by default set to the meson project version.

However, if git is found, and we manage to run 'git describe' and 'git
branch' in the source directory, version is set to the output of that
instead.
2019-05-07 20:23:51 +02:00

20 lines
678 B
Meson

scdoc = dependency('scdoc', native: true)
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
foreach man_src : ['f00bar.1.scd', 'f00bar.5.scd', 'f00bar-decorations.5.scd',
'f00bar-modules.5.scd', 'f00bar-particles.5.scd',
'f00bar-tags.5.scd']
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