+2024-12-28 Simon Josefsson <simon@josefsson.org>
+
+ maintainer-makefile: Improve gnulib-version derivation.
+ * top/maint.mk (gnulib-version): Use git only when possible,
+ falling back to GNULIB_REVISION or ChangeLog date otherwise. Use
+ consistent full identifier.
+
2024-12-28 Simon Josefsson <simon@josefsson.org>
announce-gen: Support VPATH builds better.
rel-files = $(DIST_ARCHIVES)
-gnulib-version = $$(cd $(gnulib_dir) \
- && { git describe 2> /dev/null || git rev-parse --short=10 HEAD; } )
+gnulib-version ?= \
+ $$(if test -e $(gnulib_dir)/.git; then \
+ git -C $(gnulib_dir) rev-parse HEAD; \
+ elif test -f $(srcdir)/bootstrap.conf; then \
+ perl -lne '/^\s*GNULIB_REVISION=(\S+)/ and $$d=$$1;' \
+ -e 'END{defined $$d and print $$d}' $(srcdir)/bootstrap.conf; \
+ else \
+ head -1 $(gnulib_dir)/ChangeLog | sed -e 's/ .*//;q '; \
+ fi)
bootstrap-tools ?= autoconf,automake,gnulib
gpgv = $$(gpgv2 --version >/dev/null && echo gpgv2 || echo gpgv)