[gedit] build: improve setting gedit major/minor/micro versions
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] build: improve setting gedit major/minor/micro versions
- Date: Wed, 4 Dec 2019 10:30:42 +0000 (UTC)
commit 3840f77f81eba8d4f81a20037b1df4a02db52244
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Dec 4 11:10:07 2019 +0100
build: improve setting gedit major/minor/micro versions
Have short distance between variable definition and use.
meson.build | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/meson.build b/meson.build
index 8c1890fa8..8df973ac3 100644
--- a/meson.build
+++ b/meson.build
@@ -11,10 +11,6 @@ python = import('python')
# Versioning
version = meson.project_version()
-version_arr = version.split('.')
-version_major = version_arr[0]
-version_minor = version_arr[1]
-version_micro = version_arr[2]
api_version = '3.36'
@@ -117,9 +113,11 @@ config_h.set_quoted('LOCALEDIR', localdir)
config_h.set_quoted('LIBDIR', libdir)
config_h.set_quoted('DATADIR', datadir)
config_h.set_quoted('VERSION', version)
-config_h.set('GEDIT_MAJOR_VERSION', version_major)
-config_h.set('GEDIT_MINOR_VERSION', version_minor)
-config_h.set('GEDIT_MICRO_VERSION', version_micro)
+
+version_array = meson.project_version().split('.')
+config_h.set('GEDIT_MAJOR_VERSION', version_array[0])
+config_h.set('GEDIT_MINOR_VERSION', version_array[1])
+config_h.set('GEDIT_MICRO_VERSION', version_array[2])
configure_file(
output: 'config.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]