qlibs_mans = [ 'alloc.3', 'buffer.3', 'byte.3', 'case.3', 'cdbmake.3', 'cdbread.3', 'constmap.3', 'dns.3', 'dnsstub.3', 'env.3', 'error.3', 'fd.3', 'fmt.3', 'getln.3', 'getoptb.3', 'iopause.3', 'ip4.3', 'ip6.3', 'logmsg.3', 'pathexec.3', 'scan.3', 'socket_bind.3', 'socket_connect.3', 'socket_if.3', 'socket_info.3', 'socket_recv.3', 'socket_send.3', 'socket_setup.3', 'socket_tcp.3', 'socket_udp.3', 'str.3', 'stralloc.3', 'taia.3', 'timeout.3', 'timeoutconn.3', 'wait.3', ] man_section = get_option('man_section') renamed = [] foreach m : qlibs_mans if m.endswith('.3') renamed += m.substring(0, -1) + man_section endif endforeach install_data( sources : qlibs_mans, rename : renamed, install_tag : 'man', install_dir : get_option('mandir') / ('man' + man_section), )