meson: only calculate the version once
authorEli Schwartz <eschwartz93@gmail.com>
Wed, 19 Oct 2022 22:07:52 +0000 (18:07 -0400)
committerColin Clark <colin.clark@cclark.uk>
Thu, 20 Oct 2022 11:11:46 +0000 (12:11 +0100)
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.

gen_readme.sh [deleted file]
meson.build

diff --git a/gen_readme.sh b/gen_readme.sh
deleted file mode 100755 (executable)
index d087eb9..0000000
+++ /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
index e56159d..a0aa694 100644 (file)
@@ -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)