diff options
author | Thomas White <taw@physics.org> | 2019-05-13 22:06:18 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-05-16 15:15:49 +0200 |
commit | 847f944fcfdbebf3a8b6173bf7a57a96344ddda0 (patch) | |
tree | 5aaa51c5238ee0d5576532a87d71ec9cf1f8ffeb | |
parent | ab6446a031478e7adf1692d815c9ba21de7f5b73 (diff) |
Meson stuff for VCS revision ID
-rw-r--r-- | meson.build | 14 | ||||
-rw-r--r-- | 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__ */ |