Skip to content

Commit

Permalink
Update configure.ac with some m4 magic to add a git commit id
Browse files Browse the repository at this point in the history
 and a reference of the last tag, the changes since then and the
 dirty flag from `git describe`
  • Loading branch information
Daniel Lange authored and Daniel Lange committed Apr 16, 2024
1 parent 8122fc3 commit 2acd62d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# -*- Autoconf -*-
# 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], [[email protected]], [], [https://htop.dev/])
AC_INIT([htop], [m4_join([-],m4_defn([htop_release_version]),m4_defn([htop_git_version]))], [[email protected]], [], [https://htop.dev/])

AC_CONFIG_SRCDIR([htop.c])
AC_CONFIG_AUX_DIR([build-aux])
Expand Down

0 comments on commit 2acd62d

Please sign in to comment.