[PATCH libinput] tools: add the libinput version to the man pages
Peter Hutterer
peter.hutterer at who-t.net
Thu Jun 29 00:01:10 UTC 2017
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
configure.ac | 1 +
meson.build | 45 +++++++++++++++++++---
tools/Makefile.am | 7 ++++
...ut-debug-events.1 => libinput-debug-events.man} | 2 +-
...libinput-debug-gui.1 => libinput-debug-gui.man} | 2 +-
...ut-list-devices.1 => libinput-list-devices.man} | 2 +-
...pad-tap.1 => libinput-measure-touchpad-tap.man} | 2 +-
tools/{libinput-measure.1 => libinput-measure.man} | 2 +-
tools/{libinput.1 => libinput.man} | 2 +-
9 files changed, 53 insertions(+), 12 deletions(-)
rename tools/{libinput-debug-events.1 => libinput-debug-events.man} (97%)
rename tools/{libinput-debug-gui.1 => libinput-debug-gui.man} (94%)
rename tools/{libinput-list-devices.1 => libinput-list-devices.man} (94%)
rename tools/{libinput-measure-touchpad-tap.1 => libinput-measure-touchpad-tap.man} (96%)
rename tools/{libinput-measure.1 => libinput-measure.man} (90%)
rename tools/{libinput.1 => libinput.man} (95%)
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
similarity index 97%
rename from tools/libinput-debug-events.1
rename to 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
similarity index 94%
rename from tools/libinput-debug-gui.1
rename to 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
similarity index 94%
rename from tools/libinput-list-devices.1
rename to 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
similarity index 96%
rename from tools/libinput-measure-touchpad-tap.1
rename to 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
similarity index 90%
rename from tools/libinput-measure.1
rename to 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
similarity index 95%
rename from tools/libinput.1
rename to 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
--
2.13.0
More information about the wayland-devel
mailing list