X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=build-aux%2Fannounce-gen;h=0eb6b5b6e77860ce63d728bfc0bc73b67679ab4e;hb=c9ff025783e5374226ffbf7940f40ce7db6852ed;hp=7adfef21888438f9615129eb259447315b3e9aa7;hpb=30ec6bd4ff3f1d8a71f922b1eacc9d4f8f9c4b55;p=gnulib.git diff --git a/build-aux/announce-gen b/build-aux/announce-gen index 7adfef218..0eb6b5b6e 100755 --- a/build-aux/announce-gen +++ b/build-aux/announce-gen @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' if 0; # Generate a release announcement message. -my $VERSION = '2011-04-29 19:58'; # UTC +my $VERSION = '2011-05-17 20:25'; # 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 @@ -180,7 +180,10 @@ sub print_news_deltas ($$$) { my ($news_file, $prev_version, $curr_version) = @_; - print "\n$news_file\n\n"; + my $news_name = $news_file; + $news_name =~ s|^\./||; + + print "\n$news_name\n\n"; # Print all lines from $news_file, starting with the first one # that mentions $curr_version up to but not including @@ -189,6 +192,7 @@ sub print_news_deltas ($$$) my $re_prefix = qr/(?:\* )?(?:Noteworthy c|Major c|C)(?i:hanges)/; + my $found_news; open NEWS, '<', $news_file or die "$ME: $news_file: cannot open for reading: $!\n"; while (defined (my $line = )) @@ -211,12 +215,16 @@ sub print_news_deltas ($$$) $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o and last; print $line; + $line =~ /\S/ + and $found_news = 1; } } close NEWS; $in_items or die "$ME: $news_file: no matching lines for `$curr_version'\n"; + $found_news + or die "$ME: $news_file: no news item found for `$curr_version'\n"; } sub print_changelog_deltas ($$)