meson: explain GIT_VERSION and PROJECT_VERSION

Fixes #11415.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-02-28 11:09:16 +01:00
parent 62641751d5
commit 6ffeca8c8f
2 changed files with 11 additions and 2 deletions

View File

@ -21,11 +21,13 @@ libudev_version = '1.6.17'
# names, sometimes. Not all variables are included in every
# set. Ugh, ugh, ugh!
conf = configuration_data()
conf.set('PROJECT_VERSION', meson.project_version())
conf.set('PROJECT_VERSION', meson.project_version(),
description : 'Numerical project version (used where a simple number is expected)')
substs = configuration_data()
substs.set('PROJECT_URL', 'https://www.freedesktop.org/wiki/Software/systemd')
substs.set('PROJECT_VERSION', meson.project_version())
substs.set('PROJECT_VERSION', meson.project_version(),
description : 'Numerical project version (used where a simple number is expected)')
# This is to be used instead of meson.source_root(), as the latter will return
# the wrong result when systemd is being built as a meson subproject

View File

@ -1 +1,8 @@
/* Detailed project version that includes git commit when not built from a release.
* Use this in preference to PROJECT_VERSION, with the following exceptions:
* - where a simplified form is expected for compatiblity, for example
* 'udevadm version',
* - where a simplified machine-parsable form is more useful, for example
* pkgconfig files and version information written to binary files.
*/
#define GIT_VERSION "@VCS_TAG@"