summaryrefslogtreecommitdiff
path: root/man/meson.build
blob: 003e9bec725badf036137bc516aa8f7f1e88e871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# SPDX-License-Identifier: MIT
# Copyright © 2023 Intel Corporation

prog_sed = find_program('sed')

foreach man : ['Xau', 'XauDisposeAuth', 'XauFileName', 'XauGetAuthByAddr',
               'XauGetBestAuthByAddr', 'XauLockAuth', 'XauReadAuth', 'XauUnlockAuth',
               'XauWriteAuth']
  custom_target(
    f'@man@.man',
    input : f'@man@.man',
    output : f'@man@.3',
    command : [
      prog_sed, '@INPUT@',
      '-e', 's/__xorgversion__/"libXau @0@" "X Version 11"/'.format(meson.project_version()),
      '-e', 's/__libmansuffix__/3/',
    ],
    capture : true,
    install : true,
    install_dir : get_option('prefix') / get_option('mandir') / 'man3',
  )
endforeach