From: Simon Josefsson Date: Sat, 28 Dec 2024 18:42:43 +0000 (+0100) Subject: announce-gen: Support VPATH builds better. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb48b6cb3aef16d44495f9fbc287c769adb22086;p=thirdparty%2Fgnulib.git announce-gen: Support VPATH builds better. * build-aux/announce-gen: Pass -C$srcdir to git. --- diff --git a/ChangeLog b/ChangeLog index b99da8b96a..2eed147ec8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-12-28 Simon Josefsson + + announce-gen: Support VPATH builds better. + * build-aux/announce-gen: Pass -C$srcdir to git. + 2024-12-28 Bruno Haible endian: Fix link error on CentOS 5. diff --git a/build-aux/announce-gen b/build-aux/announce-gen index cc1d46039f..2bfa393a7d 100755 --- a/build-aux/announce-gen +++ b/build-aux/announce-gen @@ -35,7 +35,7 @@ eval 'exec perl -wSx "$0" "$@"' if 0; -my $VERSION = '2024-12-10 08:57'; # UTC +my $VERSION = '2024-12-28 18:31'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -566,19 +566,19 @@ EOF my $v0 = $prev_version; my $v1 = $curr_version; - (my $first_name = `git config user.name|cut -d' ' -f1`) + (my $first_name = `git -C "$srcdir" config user.name|cut -d' ' -f1`) =~ m{\S} or die "no name? set user.name in ~/.gitconfig\n"; - chomp (my $n_ci = `git rev-list "v$v0..v$v1" | wc -l`); - chomp (my $n_p = `git shortlog "v$v0..v$v1" | grep -c '^[^ ]'`); + chomp (my $n_ci = `git -C "$srcdir" rev-list "v$v0..v$v1" | wc -l`); + chomp (my $n_p = `git -C "$srcdir" shortlog "v$v0..v$v1" | grep -c '^[^ ]'`); - my $this_commit_hash = `git log --pretty=%H -1 "v$v1"`; + my $this_commit_hash = `git -C "$srcdir" log --pretty=%H -1 "v$v1"`; chop $this_commit_hash; - my $prev_release_date = `git log --pretty=%ct -1 "v$v0"`; - my $this_release_date = `git log --pretty=%ct -1 "v$v1"`; + my $prev_release_date = `git -C "$srcdir" log --pretty=%ct -1 "v$v0"`; + my $this_release_date = `git -C "$srcdir" log --pretty=%ct -1 "v$v1"`; my $n_seconds = $this_release_date - $prev_release_date; my $time_since_prev = readable_interval $n_seconds; - my $names = `git shortlog "v$v0..v$v1"|perl -lne '/^(\\w.*):/ and print " ".\$1'`; + my $names = `git -C "$srcdir" shortlog "v$v0..v$v1"|perl -lne '/^(\\w.*):/ and print " ".\$1'`; print <