]> Savannah Git Hosting - gnulib.git/commitdiff
maintainer-makefile: Improve gnulib-version handling.
authorSimon Josefsson <simon@josefsson.org>
Thu, 2 Jan 2025 08:28:48 +0000 (09:28 +0100)
committerSimon Josefsson <simon@josefsson.org>
Thu, 2 Jan 2025 08:28:48 +0000 (09:28 +0100)
* top/maint.mk (gnulib-version): Prefix commit id with human
readable leading ChangeLog date, suggested by Bruno Haible.
(announcement): Handle multi-word gnulib-version.

ChangeLog
top/maint.mk

index f3e3f1e7846f7e8b979795b09402b89093c75f89..70bf7a7bb017ea88ebb1cdcf365a491d55cd27e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-01-02  Simon Josefsson  <simon@josefsson.org>
+
+       maintainer-makefile: Improve gnulib-version handling.
+       * top/maint.mk (gnulib-version): Prefix commit id with human
+       readable leading ChangeLog date, suggested by Bruno Haible.
+       (announcement): Handle multi-word gnulib-version.
+
 2025-01-01  Bruno Haible  <bruno@clisp.org>
 
        doc: Update regarding stable branches.
index af98762e49f0c0c8e000f6248af0cd18898e5cbc..78c757d8f1e2b60418cd3bc424dcf5e692d90836 100644 (file)
@@ -1516,13 +1516,12 @@ vc-diff-check:
 rel-files = $(DIST_ARCHIVES)
 
 gnulib-version ?= \
-  $$(if test -e $(gnulib_dir)/.git; then                               \
+  $$(head -c11 $(gnulib_dir)/ChangeLog;                                        \
+     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
 
@@ -1578,8 +1577,8 @@ announcement: NEWS ChangeLog $(rel-files)
            --srcdir=$(srcdir)                                          \
            --news=$(srcdir)/NEWS                                       \
            --bootstrap-tools=$(bootstrap-tools)                        \
-           $$(case ,$(bootstrap-tools), in (*,gnulib,*)                \
-              echo --gnulib-version=$(gnulib-version);; esac)          \
+           "$$(case ,$(bootstrap-tools), in (*,gnulib,*)               \
+              echo --gnulib-version=$(gnulib-version);; esac)"         \
            $(addprefix --url-dir=, $(url_dir_list))                    \
            $(announce_gen_args)