diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2023-06-20 15:46:23 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2023-07-13 15:26:17 -0700 |
commit | 68e74d37b99f56bbd1a5f2fb8cb4ad6116f27bd3 (patch) | |
tree | aab43287eff02394981c905bfef7b30f7d8fdb60 /man | |
parent | df1bf4fe528a5a9eef420f78efb225e4696ac467 (diff) |
add Meson build system
This is, I think, equal to the autotools build-system in every practical
way. The man pages have hardcoded numbers. I think this is okay, as all
modern operating systems seem to use the same man page numbering now.
I've also chosen to not generate a config.h file with Meson. This makes
using libXau as a subproject safer, since we don't have to worry about
conflicting config.h files, plus there are only a couple of declarations
that are actually used. This also saves some configure time in writing
out an additional file.
Diffstat (limited to 'man')
-rw-r--r-- | man/Makefile.am | 2 | ||||
-rw-r--r-- | man/meson.build | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/man/Makefile.am b/man/Makefile.am index 24c7aa3..0938fd2 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -36,7 +36,7 @@ libman_PRE = \ libman_DATA = $(libman_PRE:man=$(LIB_MAN_SUFFIX)) -EXTRA_DIST = $(libman_PRE) +EXTRA_DIST = $(libman_PRE) meson.build CLEANFILES = $(libman_DATA) diff --git a/man/meson.build b/man/meson.build new file mode 100644 index 0000000..003e9be --- /dev/null +++ b/man/meson.build @@ -0,0 +1,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
\ No newline at end of file |