diff options
author | Daniel Lange <DLange@git.local> | 2024-04-16 17:44:32 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2024-04-16 19:06:40 +0200 |
commit | 2acd62d3af56cf00fae62a86dda8bbca0f0b1913 (patch) | |
tree | aaea792507a889f0dd05e3231d22e2fbf390db79 | |
parent | 8122fc394e05507c514425b1f96637668dcefe65 (diff) |
Update configure.ac with some m4 magic to add a git commit id
and a reference of the last tag, the changes since then and the
dirty flag from `git describe`
-rw-r--r-- | configure.ac | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 0a90ca48..81836e8e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,11 +2,19 @@ # Process this file with autoconf to produce a configure script. # ---------------------------------------------------------------------- +# Build version string. +# ---------------------------------------------------------------------- + +m4_define([htop_git_version], + m4_normalize(m4_esyscmd([git describe --abbrev=7 --dirty --always --tags 2> /dev/null || echo '']))) +m4_define([htop_release_version], [3.4.0-dev]) + +# ---------------------------------------------------------------------- # Autoconf initialization. # ---------------------------------------------------------------------- AC_PREREQ([2.69]) -AC_INIT([htop], [3.4.0-dev], [htop@groups.io], [], [https://htop.dev/]) +AC_INIT([htop], [m4_join([-],m4_defn([htop_release_version]),m4_defn([htop_git_version]))], [htop@groups.io], [], [https://htop.dev/]) AC_CONFIG_SRCDIR([htop.c]) AC_CONFIG_AUX_DIR([build-aux]) |