From 847f944fcfdbebf3a8b6173bf7a57a96344ddda0 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 13 May 2019 22:06:18 +0200 Subject: Meson stuff for VCS revision ID --- meson.build | 14 +++++++++----- src/version.h.in | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index b49e183e..61818a11 100644 --- a/meson.build +++ b/meson.build @@ -104,14 +104,17 @@ version_data.set('MAJOR_VERSION', '3') version_data.set('MINOR_VERSION', '7') version_data.set('MICRO_VERSION', '0') version_data.set('EXTRA_VERSION', '') -version_data.set('BUILD_REVISION', '') version_data.set('PACKAGE', 'sylpheed') version_data.set('VERSION', '3.7.0') -configure_file(input : 'src/version.h.in', - output : 'version.h', - configuration : version_data) +version_h_tmp = configure_file(input : 'src/version.h.in', + output : 'version.h.tmp', + configuration : version_data) +version_h = vcs_tag(output : 'version.h', + input : version_h_tmp, + replace_string : 'VCS_TAG', + command: ['git', 'rev-parse', '--short', 'HEAD']) # Instructions for building libsylph @@ -326,7 +329,8 @@ executable('sylpheed', 'src/trayicon.c', 'src/undo.c', 'src/update_check.c', - 'src/vcard.c'], + 'src/vcard.c', + version_h], dependencies : [gtk, glib, gobject, gmodule, libsylph_dep, openssl, gtkspell, aspell, enchant], install : true) diff --git a/src/version.h.in b/src/version.h.in index 05ee734b..a3941904 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -28,6 +28,6 @@ #define EXTRA_VERSION "@EXTRA_VERSION@" #define PROG_VERSION "Sylpheed " VERSION -#define BUILD_REVISION @BUILD_REVISION@ +#define BUILD_REVISION VCS_TAG #endif /* __VERSION_H__ */ -- cgit v1.2.3