From 91d7a63aabf9c5850ed15500bc953fa1274e1175 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 19 Oct 2022 18:07:52 -0400 Subject: [PATCH] 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. --- gen_readme.sh | 26 -------------------------- meson.build | 2 +- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100755 gen_readme.sh 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) -- 2.20.1