if not get_option('manpage') subdir_done() endif sh = find_program('sh', required: true, native: true, disabler: true) foreach f : [ 'smolbote.1', 'smolboterc.5', 'smolbote-profile.5' ] manpage = custom_target(f, input: 'man'/f+'.scd', output: '@BASENAME@', capture: true, command: [ sh, meson.current_source_dir()/'man/genroff.sh', '@INPUT@' ], install: true, install_dir: get_option('mandir') ) endforeach