changeset 16907:3cd0e20dcf8e

announce-gen: VPATH issues * build-aux/announce-gen (--srcdir): New option, used to trim the $srcdir part of the path from $builddir to NEWS. * top/maint.mk (announcement): Adjust.
author Akim Demaille <akim@lrde.epita.fr>
date Tue, 12 Jun 2012 12:23:59 +0200
parents e055c477da04
children bb4ca9725d0a 73aa5aacb5f3
files ChangeLog build-aux/announce-gen top/maint.mk
diffstat 3 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jun 07 16:17:36 2012 +0200
+++ b/ChangeLog	Tue Jun 12 12:23:59 2012 +0200
@@ -1,3 +1,10 @@
+2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
+
+	announce-gen: VPATH issues
+	* build-aux/announce-gen (--srcdir): New option, used to trim the
+	$srcdir part of the path from $builddir to NEWS.
+	* top/maint.mk (announcement): Adjust.
+
 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
 
 	gnu-web-doc-update: VPATH builds
--- a/build-aux/announce-gen	Thu Jun 07 16:17:36 2012 +0200
+++ b/build-aux/announce-gen	Tue Jun 12 12:23:59 2012 +0200
@@ -3,7 +3,7 @@
     if 0;
 # Generate a release announcement message.
 
-my $VERSION = '2012-05-23 08:55'; # UTC
+my $VERSION = '2012-06-08 06:53'; # 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
@@ -38,6 +38,7 @@
 
 my %valid_release_types = map {$_ => 1} qw (alpha beta stable);
 my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz');
+my $srcdir = '.';
 
 sub usage ($)
 {
@@ -52,7 +53,7 @@
       my @types = sort keys %valid_release_types;
       print $STREAM <<EOF;
 Usage: $ME [OPTIONS]
-Generate an announcement message.
+Generate an announcement message.  Run this from builddir.
 
 OPTIONS:
 
@@ -67,7 +68,9 @@
 
 The following are optional:
 
-   --news=NEWS_FILE
+   --news=NEWS_FILE             include the NEWS section about this release
+                                from this NEWS_FILE; accumulates.
+   --srcdir=DIR                 where to find the NEWS_FILEs (default: $srcdir)
    --bootstrap-tools=TOOL_LIST  a comma-separated list of tools, e.g.,
                                 autoconf,automake,bison,gnulib
    --gnulib-version=VERSION     report VERSION as the gnulib version, where
@@ -182,7 +185,7 @@
   my ($news_file, $prev_version, $curr_version) = @_;
 
   my $news_name = $news_file;
-  $news_name =~ s|^\./||;
+  $news_name =~ s|^\Q$srcdir\E/||;
 
   print "\n$news_name\n\n";
 
@@ -388,6 +391,7 @@
      'gpg-key-id=s'       => \$gpg_key_id,
      'url-directory=s'    => \@url_dir_list,
      'news=s'             => \@news_file,
+     'srcdir=s'           => \$srcdir,
      'bootstrap-tools=s'  => \$bootstrap_tools,
      'gnulib-version=s'   => \$gnulib_version,
      'print-checksums!'   => \$print_checksums_p,
--- a/top/maint.mk	Thu Jun 07 16:17:36 2012 +0200
+++ b/top/maint.mk	Tue Jun 12 12:23:59 2012 +0200
@@ -1268,6 +1268,7 @@
 	    --prev=$(PREV_VERSION)					\
 	    --curr=$(VERSION)						\
 	    --gpg-key-id=$(gpg_key_ID)					\
+	    --srcdir=$(srcdir)						\
 	    --news=$(srcdir)/NEWS					\
 	    --bootstrap-tools=$(bootstrap-tools)			\
 	    $$(case ,$(bootstrap-tools), in (*,gnulib,*)		\