summaryrefslogtreecommitdiff
path: root/tools/meson-vcs-tag.sh
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2021-01-10 13:18:36 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2021-01-15 19:34:44 +0100
commit064b8e2c99ceb348c515353cc5c7d7bd05c49fcb (patch)
treea636f29412fe165f39ac006c6881202b34886865 /tools/meson-vcs-tag.sh
parentbf1868c8d7abaadaad4df00aafb9c183c8d6480b (diff)
downloadsystemd-064b8e2c99ceb348c515353cc5c7d7bd05c49fcb.tar.gz
meson: Use configure_file when version-tag is specified
vcs_tag() is slow. When the version-tag meson option is set, we can use configure_file() directly to speed up incremental builds. Before (with version-tag set to v247): ``` ‣ Running build script... [1/418] Generating version.h with a custom command real 0m0.521s user 0m0.229s sys 0m0.067s ``` After (with version-tag set to v247): ``` ‣ Running build script... ninja: no work to do. real 0m0.094s user 0m0.048s sys 0m0.022s ```
Diffstat (limited to 'tools/meson-vcs-tag.sh')
-rwxr-xr-xtools/meson-vcs-tag.sh8
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/meson-vcs-tag.sh b/tools/meson-vcs-tag.sh
index 1c3814d483..a285210f96 100755
--- a/tools/meson-vcs-tag.sh
+++ b/tools/meson-vcs-tag.sh
@@ -4,13 +4,7 @@ set -eu
set -o pipefail
dir="$1"
-tag="$2"
-fallback="$3"
-
-if [ -n "$tag" ]; then
- echo "$tag"
- exit 0
-fi
+fallback="$2"
# Apparently git describe has a bug where it always considers the work-tree
# dirty when invoked with --git-dir (even though 'git status' is happy). Work