summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-03-24 12:49:32 -0700
committerEric Anholt <eric@anholt.net>2017-03-31 13:27:08 -0700
commit253948b8d731b34a339aad8d42369c73644abec9 (patch)
tree83b5173cb7473d10aad3199e3e9bd559588a4b81
parentad7d25fb954861fc682ab77b28b6a7dba6badb05 (diff)
Simplify manpage variable substitution for Meson.
The previous code was contorting itself to do the substitution in the same source format as the xorg automake macros. Now that automake is gone, we can simplify it. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-rw-r--r--man/rendercheck.man2
-rw-r--r--meson.build15
2 files changed, 5 insertions, 12 deletions
diff --git a/man/rendercheck.man b/man/rendercheck.man
index b7be417..3d0e16f 100644
--- a/man/rendercheck.man
+++ b/man/rendercheck.man
@@ -1,5 +1,5 @@
.ds q \N'34'
-.TH rendercheck 1 __xorgversion__
+.TH rendercheck 1 "rendercheck @version@" "X Version 11"
.SH NAME
rendercheck \- simple tests of the X Render extension.
.SH SYNOPSIS
diff --git a/meson.build b/meson.build
index 25b8e43..e9f5bf4 100644
--- a/meson.build
+++ b/meson.build
@@ -48,19 +48,12 @@ executable(
install: true,
)
-man_xorgversion = '"rendercheck @0@" "X Version 11"'.format(project_version)
-
-custom_target(
- 'manpage',
+man_config = configuration_data()
+man_config.set('version', project_version)
+rendercheck_man = configure_file(
input: 'man/rendercheck.man',
output: 'rendercheck.1',
- command: [
- 'sed',
- '-e',
- 's/__xorgversion__/@0@/'.format(man_xorgversion),
- '@INPUT@'
- ],
- capture: true,
+ configuration: man_config,
install: true,
install_dir: join_paths(get_option('mandir'), 'man1'),
)