summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-06-29 08:40:28 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-07-03 11:09:03 +1000
commit5bba2dbb3ffe24c0fd18b8de5b4b88b3160534ad (patch)
treef40f1fce57f681fc0f15f13a4a3e26f8d3c23426
parent24ad0082940c9a023f8f8ae66fcabbc5713f96bf (diff)
downloadlibinput-5bba2dbb3ffe24c0fd18b8de5b4b88b3160534ad.tar.gz
tools: add the libinput version to the man pages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-rw-r--r--configure.ac1
-rw-r--r--meson.build45
-rw-r--r--tools/Makefile.am7
-rw-r--r--tools/libinput-debug-events.man (renamed from tools/libinput-debug-events.1)2
-rw-r--r--tools/libinput-debug-gui.man (renamed from tools/libinput-debug-gui.1)2
-rw-r--r--tools/libinput-list-devices.man (renamed from tools/libinput-list-devices.1)2
-rw-r--r--tools/libinput-measure-touchpad-tap.man (renamed from tools/libinput-measure-touchpad-tap.1)2
-rw-r--r--tools/libinput-measure.man (renamed from tools/libinput-measure.1)2
-rw-r--r--tools/libinput.man (renamed from tools/libinput.1)2
9 files changed, 53 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 067c3e1a..a66371cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,7 @@ AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC_C99
AC_PROG_CXX # Only used by build C++ test
AC_PROG_GREP
+AC_PROG_SED
# Only used for testing the hwdb
AM_PATH_PYTHON([3.0],, [:])
diff --git a/meson.build b/meson.build
index bd9b6193..bc639718 100644
--- a/meson.build
+++ b/meson.build
@@ -357,6 +357,9 @@ lib_tools_shared = static_library('tools_shared',
dep_tools_shared = declare_dependency(link_with : lib_tools_shared,
dependencies : deps_tools_shared)
+man_config = configuration_data()
+man_config.set('LIBINPUT_VERSION', meson.project_version())
+
deps_tools = [ dep_tools_shared, dep_libinput ]
libinput_debug_events_sources = [ 'tools/libinput-debug-events.c' ]
executable('libinput-debug-events',
@@ -366,7 +369,12 @@ executable('libinput-debug-events',
install_dir : libinput_tool_path,
install : true
)
-install_man('tools/libinput-debug-events.1')
+configure_file(input : 'tools/libinput-debug-events.man',
+ output : 'libinput-debug-events.1',
+ configuration : man_config,
+ install : true,
+ install_dir : join_paths(get_option('mandir'), 'man1')
+ )
libinput_list_devices_sources = [ 'tools/libinput-list-devices.c' ]
executable('libinput-list-devices',
@@ -376,7 +384,12 @@ executable('libinput-list-devices',
install_dir : libinput_tool_path,
install : true,
)
-install_man('tools/libinput-list-devices.1')
+configure_file(input : 'tools/libinput-list-devices.man',
+ output : 'libinput-list-devices.1',
+ configuration : man_config,
+ install : true,
+ install_dir : join_paths(get_option('mandir'), 'man1')
+ )
libinput_measure_sources = [ 'tools/libinput-measure.c' ]
executable('libinput-measure',
@@ -386,7 +399,12 @@ executable('libinput-measure',
install_dir : libinput_tool_path,
install : true,
)
-install_man('tools/libinput-measure.1')
+configure_file(input : 'tools/libinput-measure.man',
+ output : 'libinput-measure.1',
+ configuration : man_config,
+ install : true,
+ install_dir : join_paths(get_option('mandir'), 'man1')
+ )
libinput_measure_touchpad_tap_sources = [ 'tools/libinput-measure-touchpad-tap.c' ]
executable('libinput-measure-touchpad-tap',
@@ -396,7 +414,12 @@ executable('libinput-measure-touchpad-tap',
install_dir : libinput_tool_path,
install : true,
)
-install_man('tools/libinput-measure-touchpad-tap.1')
+configure_file(input : 'tools/libinput-measure-touchpad-tap.man',
+ output : 'libinput-measure-touchpad-tap.1',
+ configuration : man_config,
+ install : true,
+ install_dir : join_paths(get_option('mandir'), 'man1')
+ )
if get_option('debug-gui')
dep_gtk = dependency('gtk+-3.0')
@@ -416,7 +439,12 @@ if get_option('debug-gui')
install_dir : libinput_tool_path,
install : true
)
- install_man('tools/libinput-debug-gui.1')
+ configure_file(input : 'tools/libinput-debug-gui.man',
+ output : 'libinput-debug-gui.1',
+ configuration : man_config,
+ install : true,
+ install_dir : join_paths(get_option('mandir'), 'man1')
+ )
endif
libinput_sources = [ 'tools/libinput-tool.c' ]
@@ -427,7 +455,12 @@ executable('libinput',
include_directories : include_directories ('src'),
install : true
)
-install_man('tools/libinput.1')
+configure_file(input : 'tools/libinput.man',
+ output : 'libinput.1',
+ configuration : man_config,
+ install : true,
+ install_dir : join_paths(get_option('mandir'), 'man1')
+ )
meson.add_install_script('tools/install-compat-scripts.sh')
diff --git a/tools/Makefile.am b/tools/Makefile.am
index a484e253..2c8660bf 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -70,3 +70,10 @@ install-data-hook:
uninstall-local:
rm -f $(DESTDIR)$(bindir)/libinput-list-devices
rm -f $(DESTDIR)$(bindir)/libinput-debug-events
+
+SUFFIXES = .man
+.man.1:
+ $(AM_V_GEN)$(SED) -e 's|\@LIBINPUT_VERSION\@|$(PACKAGE_VERSION)|' < $< > $@
+CLEANFILES = *.1
+EXTRA_DIST += $(dist_man1_MANS:.1=.man)
+
diff --git a/tools/libinput-debug-events.1 b/tools/libinput-debug-events.man
index 60303888..ac16d579 100644
--- a/tools/libinput-debug-events.1
+++ b/tools/libinput-debug-events.man
@@ -1,4 +1,4 @@
-.TH libinput-debug-events "1"
+.TH libinput-debug-events "1" "" "libinput @LIBINPUT_VERSION@" "libinput Manual"
.SH NAME
libinput\-debug\-events \- debug helper for libinput
.SH SYNOPSIS
diff --git a/tools/libinput-debug-gui.1 b/tools/libinput-debug-gui.man
index 00263ac3..de6a67a8 100644
--- a/tools/libinput-debug-gui.1
+++ b/tools/libinput-debug-gui.man
@@ -1,4 +1,4 @@
-.TH libinput-debug-gui "1"
+.TH libinput-debug-gui "1" "" "libinput @LIBINPUT_VERSION@" "libinput Manual"
.SH NAME
libinput\-debug\-gui \- visual debug helper for libinput
.SH SYNOPSIS
diff --git a/tools/libinput-list-devices.1 b/tools/libinput-list-devices.man
index 1d68a675..ccb30fff 100644
--- a/tools/libinput-list-devices.1
+++ b/tools/libinput-list-devices.man
@@ -1,4 +1,4 @@
-.TH libinput-list-devices "1"
+.TH libinput-list-devices "1" "" "libinput @LIBINPUT_VERSION@" "libinput Manual"
.SH NAME
libinput\-list\-devices \- list local devices as recognized by libinput
.SH SYNOPSIS
diff --git a/tools/libinput-measure-touchpad-tap.1 b/tools/libinput-measure-touchpad-tap.man
index cc295e14..f0e4325f 100644
--- a/tools/libinput-measure-touchpad-tap.1
+++ b/tools/libinput-measure-touchpad-tap.man
@@ -1,4 +1,4 @@
-.TH libinput-measure-touchpad-tap "1"
+.TH libinput-measure-touchpad-tap "1" "" "libinput @LIBINPUT_VERSION@" "libinput Manual"
.SH NAME
libinput\-measure\-touchpad\-tap \- measure tap-to-click properities of devices
.SH SYNOPSIS
diff --git a/tools/libinput-measure.1 b/tools/libinput-measure.man
index 754ed40e..470657fe 100644
--- a/tools/libinput-measure.1
+++ b/tools/libinput-measure.man
@@ -1,4 +1,4 @@
-.TH libinput-measure "1"
+.TH libinput-measure "1" "" "libinput @LIBINPUT_VERSION@" "libinput Manual"
.SH NAME
libinput\-measure \- measure properties of devices
.SH SYNOPSIS
diff --git a/tools/libinput.1 b/tools/libinput.man
index cb28937c..39bb34c4 100644
--- a/tools/libinput.1
+++ b/tools/libinput.man
@@ -1,4 +1,4 @@
-.TH libinput "1"
+.TH libinput "1" "" "libinput @LIBINPUT_VERSION@" "libinput Manual"
.SH NAME
libinput \- tool to interface with libinput
.SH SYNOPSIS