From: Eli Schwartz Date: Wed, 19 Oct 2022 22:07:52 +0000 (-0400) Subject: meson: only calculate the version once X-Git-Tag: v2.1~133 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=91d7a63aabf9c5850ed15500bc953fa1274e1175 meson: only calculate the version once Once set in project() it will make that value accessible without re-running a shell script, which speeds up configuration slightly due to less forking. --- diff --git a/gen_readme.sh b/gen_readme.sh deleted file mode 100755 index d087eb91..00000000 --- a/gen_readme.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -## @file -## @brief Convert README.md to README.html -## -## Create README.html file, -## - -srcdir="$1" -builddir="$2" - -if [ ! -e "$srcdir/README.md" ] -then - printf '%s\n' "ERROR: README.md not found" - exit 1 -fi - -if ! command -v pandoc > /dev/null 2>&1 -then - printf '%s\n' "ERROR: File pandoc not installed" - exit 1 -fi - -pandoc "$srcdir/README.md" > "$builddir/README.html" - -exit 0 diff --git a/meson.build b/meson.build index e56159d7..a0aa6940 100644 --- a/meson.build +++ b/meson.build @@ -140,7 +140,7 @@ summary({'gq_appdir': gq_appdir, # Create the define constants used in the sources. Set via config.h.in conf_data = configuration_data() -conf_data.set_quoted('VERSION', run_command('./version.sh', check : true).stdout()) +conf_data.set_quoted('VERSION', meson.project_version()) conf_data.set('DEBUG', debug) gtk_dep = dependency('gtk+-3.0', version : '>=3.22', required: true)