diff --git a/meson.build b/meson.build index f74a0bf3b2..a72b00fdaf 100644 --- a/meson.build +++ b/meson.build @@ -20,12 +20,11 @@ libudev_version = '1.6.12' # names, sometimes. Not all variables are included in every # set. Ugh, ugh, ugh! conf = configuration_data() -conf.set_quoted('PACKAGE_STRING', meson.project_name() + ' ' + meson.project_version()) -conf.set_quoted('PACKAGE_VERSION', meson.project_version()) +conf.set('PROJECT_VERSION', meson.project_version()) substs = configuration_data() -substs.set('PACKAGE_URL', 'https://www.freedesktop.org/wiki/Software/systemd') -substs.set('PACKAGE_VERSION', meson.project_version()) +substs.set('PROJECT_URL', 'https://www.freedesktop.org/wiki/Software/systemd') +substs.set('PROJECT_VERSION', meson.project_version()) want_ossfuzz = get_option('oss-fuzz') want_libfuzzer = get_option('llvm-fuzz') @@ -582,6 +581,11 @@ endif ##################################################################### +vcs_tagger = [meson.source_root() + '/tools/meson-vcs-tag.sh', + meson.source_root(), + get_option('version-tag'), + meson.project_version()] + sed = find_program('sed') awk = find_program('awk') m4 = find_program('m4') @@ -2892,8 +2896,9 @@ foreach tuple : fuzzers endforeach endif -run_target('fuzzers', - depends : fuzzer_exes, +run_target( + 'fuzzers', + depends : [fuzzer_exes, version_h], command : ['true']) ############################################################ diff --git a/meson_options.txt b/meson_options.txt index 3474265bd3..044bb792b5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,6 +1,9 @@ # -*- mode: meson -*- # SPDX-License-Identifier: LGPL-2.1+ +option('version-tag', type : 'string', + description : 'override the git version string') + option('split-usr', type : 'combo', choices : ['auto', 'true', 'false'], description : '''/bin, /sbin aren't symlinks into /usr''') option('split-bin', type : 'combo', choices : ['auto', 'true', 'false'], diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index 1f69b9fda1..3915b66739 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -14,6 +14,7 @@ #include "alloc-util.h" #include "analyze-security.h" #include "analyze-verify.h" +#include "build.h" #include "bus-error.h" #include "bus-unit-util.h" #include "bus-util.h" @@ -696,7 +697,7 @@ static int analyze_plot(int argc, char *argv[], void *userdata) { "\n" "\n" "\n\n" - "\n\n", PACKAGE_VERSION); + "\n\n", GIT_VERSION); /* style sheet */ svg("\n