mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 05:40:04 +01:00
tools: add the git version in the libinput-record output
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
a437d9374b
commit
cd63ba2cc0
3 changed files with 10 additions and 0 deletions
|
|
@ -240,6 +240,11 @@ pkgconfig.generate(
|
|||
libraries : lib_libinput
|
||||
)
|
||||
|
||||
vcs_tag(['git', 'describe'],
|
||||
'unknown',
|
||||
input : 'src/libinput-git-version.h.in',
|
||||
output :'libinput-git-version.h')
|
||||
|
||||
# Restore the SELinux context for the libinput.so.a.b.c on install
|
||||
# meson bug https://github.com/mesonbuild/meson/issues/1967
|
||||
meson.add_install_script('src/libinput-restore-selinux-context.sh',
|
||||
|
|
|
|||
3
src/libinput-git-version.h.in
Normal file
3
src/libinput-git-version.h.in
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
#define LIBINPUT_GIT_VERSION "@VCS_TAG@"
|
||||
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include "libinput-util.h"
|
||||
#include "libinput-version.h"
|
||||
#include "libinput-git-version.h"
|
||||
|
||||
static const int FILE_VERSION_NUMBER = 1;
|
||||
|
||||
|
|
@ -278,6 +279,7 @@ print_libinput_header(struct record_context *ctx)
|
|||
iprintf(ctx, "libinput:\n");
|
||||
indent_push(ctx);
|
||||
iprintf(ctx, "version: \"%s\"\n", LIBINPUT_VERSION);
|
||||
iprintf(ctx, "git: \"%s\"\n", LIBINPUT_GIT_VERSION);
|
||||
if (ctx->timeout > 0)
|
||||
iprintf(ctx, "autorestart: %d\n", ctx->timeout);
|
||||
indent_pop(ctx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue