bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: Config -> build-aux


From: Akim Demaille
Subject: FYI: Config -> build-aux
Date: Fri, 21 Oct 2005 11:12:53 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        Finish the transition config -> build-aux.
        * configure.ac, Makefile.am: Use build-aux.
        * config/prev-version, config/announce-gen, config/Makefile.am:
        Move to...
        * build-aux/prev-version, build-aux/announce-gen,
        * build-aux/Makefile.am: here.

Index: .cvsignore
===================================================================
RCS file: /cvsroot/bison/bison/.cvsignore,v
retrieving revision 1.23
diff -u -u -r1.23 .cvsignore
--- .cvsignore 22 May 2005 17:45:28 -0000 1.23
+++ .cvsignore 21 Oct 2005 09:12:25 -0000
@@ -13,7 +13,6 @@
 autom4te.cache
 b.out
 bison-*
-build-aux
 conf[0-9]*
 confdefs*
 config.cache
Index: Makefile.am
===================================================================
RCS file: /cvsroot/bison/bison/Makefile.am,v
retrieving revision 1.42
diff -u -u -r1.42 Makefile.am
--- Makefile.am 3 Oct 2005 17:12:03 -0000 1.42
+++ Makefile.am 21 Oct 2005 09:12:26 -0000
@@ -18,7 +18,7 @@
 
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = config po runtime-po lib data src doc examples tests
+SUBDIRS = build-aux po runtime-po lib data src doc examples tests
 
 # Files installed for use by Automake.
 aclocaldir = @aclocaldir@
Index: configure.ac
===================================================================
RCS file: /cvsroot/bison/bison/configure.ac,v
retrieving revision 1.60
diff -u -u -r1.60 configure.ac
--- configure.ac 19 Sep 2005 07:08:00 -0000 1.60
+++ configure.ac 21 Oct 2005 09:12:26 -0000
@@ -133,7 +133,7 @@
 AC_SUBST([O0CXXFLAGS])
 
 AC_CONFIG_FILES([Makefile
-                 config/Makefile
+                 build-aux/Makefile
                  po/Makefile.in
                  data/Makefile
                 examples/Makefile
Index: build-aux/.cvsignore
===================================================================
RCS file: build-aux/.cvsignore
diff -N build-aux/.cvsignore
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ build-aux/.cvsignore 21 Oct 2005 09:12:26 -0000
@@ -0,0 +1,13 @@
+*.t
+Makefile
+Makefile.in
+config.guess
+config.rpath
+config.sub
+depcomp
+install-sh
+mdate-sh
+missing
+mkinstalldirs
+texinfo.tex
+ylwrap
Index: build-aux/Makefile.am
===================================================================
RCS file: build-aux/Makefile.am
diff -N build-aux/Makefile.am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ build-aux/Makefile.am 21 Oct 2005 09:12:26 -0000
@@ -0,0 +1,2 @@
+## Process this file with automake to produce Makefile.in -*-Makefile-*-
+EXTRA_DIST = prev-version.txt
Index: build-aux/announce-gen
===================================================================
RCS file: build-aux/announce-gen
diff -N build-aux/announce-gen
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ build-aux/announce-gen 21 Oct 2005 09:12:26 -0000
@@ -0,0 +1,338 @@
+#!/usr/bin/perl -w
+# Generate an announcement message.
+use strict;
+
+use Getopt::Long;
+use Digest::MD5;
+use Digest::SHA1;
+
+(my $VERSION = '$Revision: 1.2 $ ') =~ tr/[0-9].//cd;
+(my $ME = $0) =~ s|.*/||;
+
+my %valid_release_types = map {$_ => 1} qw (alpha beta major);
+
+END
+{
+  # Nobody ever checks the status of print()s.  That's okay, because
+  # if any do fail, we're guaranteed to get an indicator when we close()
+  # the filehandle.
+  #
+  # Close stdout now, and if there were no errors, return happy status.
+  # If stdout has already been closed by the script, though, do nothing.
+  defined fileno STDOUT
+    or return;
+  close STDOUT
+    and return;
+
+  # Errors closing stdout.  Indicate that, and hope stderr is OK.
+  warn "$ME: closing standard output: $!\n";
+
+  # Don't be so arrogant as to assume that we're the first END handler
+  # defined, and thus the last one invoked.  There may be others yet
+  # to come.  $? will be passed on to them, and to the final _exit().
+  #
+  # If it isn't already an error, make it one (and if it _is_ an error,
+  # preserve the value: it might be important).
+  $? ||= 1;
+}
+
+sub usage ($)
+{
+  my ($exit_code) = @_;
+  my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
+  if ($exit_code != 0)
+    {
+      print $STREAM "Try `$ME --help' for more information.\n";
+    }
+  else
+    {
+      my @types = sort keys %valid_release_types;
+      print $STREAM <<EOF;
+Usage: $ME [OPTIONS]
+
+OPTIONS:
+
+  Generate an announcement message.
+
+  FIXME: describe the following
+
+   --release-type=TYPE          TYPE must be one of @types
+   --package-name=PACKAGE_NAME
+   --previous-version=VER
+   --current-version=VER
+   --release-archive-directory=DIR
+   --url-directory=URL_DIR
+   --news=NEWS_FILE             optional
+
+   --help             display this help and exit
+   --version          output version information and exit
+
+EOF
+    }
+  exit $exit_code;
+}
+
+sub print_changelog_deltas ($$)
+{
+  my ($package_name, $prev_version) = @_;
+
+  # Print new ChangeLog entries.
+
+  # First find all CVS-controlled ChangeLog files.
+  use File::Find;
+  my @changelog;
+  find ({wanted => sub {$_ eq 'ChangeLog' && -d 'CVS'
+                         and push @changelog, $File::Find::name}},
+       '.');
+
+  # If there are no ChangeLog files, we're done.
+  @changelog
+    or return;
+  my %changelog = map {$_ => 1} @changelog;
+
+  # Reorder the list of files so that if there are ChangeLog
+  # files in the specified directories, they're listed first,
+  # in this order:
+  my @dir = qw ( . src lib m4 config doc );
+
+  # A typical @changelog array might look like this:
+  # ./ChangeLog
+  # ./po/ChangeLog
+  # ./m4/ChangeLog
+  # ./lib/ChangeLog
+  # ./doc/ChangeLog
+  # ./config/ChangeLog
+  my @reordered;
+  foreach my $d (@dir)
+    {
+      my $dot_slash = $d eq '.' ? $d : "./$d";
+      my $target = "$dot_slash/ChangeLog";
+      delete $changelog{$target}
+       and push @reordered, $target;
+    }
+
+  # Append any remaining ChangeLog files.
+  push @reordered, sort keys %changelog;
+
+  # Remove leading `./'.
+  @reordered = map { s!^\./!!; $_ } @reordered;
+
+  print "\nChangeLog entries:\n\n";
+  # print join ("\n", @reordered), "\n";
+
+  $prev_version =~ s/\./_/g;
+  my $prev_cvs_tag = "\U$package_name\E-$prev_version";
+
+  my $cmd = "cvs -n diff -u -r$prev_cvs_tag -rHEAD @reordered";
+  open DIFF, '-|', $cmd
+    or die "$ME: cannot run `$cmd': $!\n";
+  # Print two types of lines, making minor changes:
+  # Lines starting with `+++ ', e.g.,
+  # +++ ChangeLog   22 Feb 2003 16:52:51 -0000      1.247
+  # and those starting with `+'.
+  # Don't print the others.
+  my $prev_printed_line_empty = 1;
+  while (defined (my $line = <DIFF>))
+    {
+      if ($line =~ /^\+\+\+ /)
+       {
+         my $separator = "*"x70 ."\n";
+         $line =~ s///;
+         $line =~ s/\s.*//;
+         $prev_printed_line_empty
+           or print "\n";
+         print $separator, $line, $separator;
+       }
+      elsif ($line =~ /^\+/)
+       {
+         $line =~ s///;
+         print $line;
+         $prev_printed_line_empty = ($line =~ /^$/);
+       }
+    }
+  close DIFF;
+
+  # The exit code should be 1.
+  # Allow in case there are no modified ChangeLog entries.
+  $? == 256 || $? == 128
+    or warn "$ME: warning: `cmd' had unexpected exit code or signal ($?)\n";
+}
+
+{
+  my $release_type;
+  my $package_name;
+  my $prev_version;
+  my $curr_version;
+  my $release_archive_dir;
+  my @url_dir_list;
+  my $news_file;
+
+  GetOptions
+    (
+     'release-type=s' => \$release_type,
+     'package-name=s' => \$package_name,
+     'previous-version=s' => \$prev_version,
+     'current-version=s' => \$curr_version,
+     'release-archive-directory=s' => \$release_archive_dir,
+     'url-directory=s@' => address@hidden,
+     'news=s@' => \$news_file,
+
+     help => sub { usage 0 },
+     version => sub { print "$ME version $VERSION\n"; exit },
+    ) or usage 1;
+
+  my $fail = 0;
+  # Ensure that sure each required option is specified.
+  $release_type
+    or (warn "$ME: release type not specified\n"), $fail = 1;
+  $package_name
+    or (warn "$ME: package name not specified\n"), $fail = 1;
+  $prev_version
+    or (warn "$ME: previous version string not specified\n"), $fail = 1;
+  $curr_version
+    or (warn "$ME: current version string not specified\n"), $fail = 1;
+  $release_archive_dir
+    or (warn "$ME: release directory name not specified\n"), $fail = 1;
+  @url_dir_list
+    or (warn "$ME: URL directory name(s) not specified\n"), $fail = 1;
+
+  exists $valid_release_types{$release_type}
+    or (warn "$ME: `$release_type': invalid release type\n"), $fail = 1;
+
+  @ARGV
+    and (warn "$ME: too many arguments\n"), $fail = 1;
+  $fail
+    and usage 1;
+
+  my $my_distdir = "$package_name-$curr_version";
+  my $tgz = "$my_distdir.tar.gz";
+  my $tbz = "$my_distdir.tar.bz2";
+  my $xd = "$package_name-$prev_version-$curr_version.xdelta";
+
+  my %size;
+
+  foreach my $f (($tgz, $tbz, $xd))
+    {
+      my $cmd = "du --human $f";
+      my $t = `$cmd`;
+      # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS
+      $@
+       and (warn "$ME: command failed: `$cmd'\n"), $fail = 1;
+      chomp $t;
+      $t =~ s/^([\d.]+[MkK]).*/${1}B/;
+      $size{$f} = $t;
+    }
+
+  $fail
+    and exit 1;
+
+  # The markup is escaped as <\# so that when this script is sent by
+  # mail (or part of a diff), Gnus is not triggered.
+  print <<EOF;
+
+Subject: $my_distdir released
+
+<\#secure method=pgpmime mode=sign>
+
+FIXME: put comments here
+
+EOF
+
+  print "Here are the compressed sources:\n";
+  foreach my $url (@url_dir_list)
+    {
+      print "  $url/$tgz   ($size{$tgz})\n";
+      print "  $url/$tbz  ($size{$tbz})\n";
+    }
+
+  print "\nAnd here are xdelta-style diffs:\n";
+  foreach my $url (@url_dir_list)
+    {
+      print "  $url/$xd   ($size{$xd})\n";
+    }
+
+  print "\nHere are GPG detached signatures:\n";
+  foreach my $url (@url_dir_list)
+    {
+      print "  $url/$tgz.asc\n";
+      print "  $url/$tbz.asc\n";
+    }
+
+  # FIXME: clean up upon interrupt or die
+  my $tmpdir = $ENV{TMPDIR} || '/tmp';
+  my $tmp = "$tmpdir/$ME-$$";
+  unlink $tmp;  # ignore failure
+
+  print "\nHere are the MD5 and SHA1 signatures:\n";
+  print "\n";
+  # The markup is escaped as <\# so that when this script is sent by
+  # mail (or part of a diff), Gnus is not triggered.
+  print "<\#part type=text/plain filename=\"$tmp\" disposition=inline>\n"
+    . "<\#/part>\n";
+
+  open OUT, '>', $tmp
+    or die "$ME: $tmp: cannot open for writing: $!\n";
+
+  foreach my $meth (qw (md5 sha1))
+    {
+      foreach my $f (($tgz, $tbz, $xd))
+       {
+         open IN, '<', $f
+           or die "$ME: $f: cannot open for reading: $!\n";
+         binmode IN;
+         my $dig =
+           ($meth eq 'md5'
+            ? Digest::MD5->new->addfile(*IN)->hexdigest
+            : Digest::SHA1->new->addfile(*IN)->hexdigest);
+         close IN;
+         print OUT "$dig  $f\n";
+       }
+    }
+
+  close OUT
+    or die "$ME: $tmp: while writing: $!\n";
+  chmod 0400, $tmp;  # ignore failure
+
+  if ($news_file)
+    {
+      print "\nNEWS\n\n";
+
+      # Print all lines from $news_file, starting with the first one
+      # that mentions $curr_version up to but not including
+      # the first occurrence of $prev_version.
+      my $in_items;
+      open NEWS, '<', $news_file
+       or die "$ME: $news_file: cannot open for reading: $!\n";
+      while (defined (my $line = <NEWS>))
+       {
+         if ( ! $in_items)
+           {
+             # Match lines like this one:
+             # * Major changes in release 5.0.1:
+             # but not any other line that starts with a space, *, or -.
+             $line =~ /^(\* Major changes.*|[^ *-].*)\Q$curr_version\E/o
+               or next;
+             $in_items = 1;
+             print $line;
+           }
+         else
+           {
+             # Be careful that this regexp cannot match version numbers
+             # in NEWS items -- they might well say `introduced in 4.5.5',
+             # and we don't want that to match.
+             $line =~ /^(\* Major changes.*|[^ *-].*)\Q$prev_version\E/o
+               and last;
+             print $line;
+           }
+       }
+      close NEWS;
+
+      $in_items
+       or die "$ME: $news_file: no matching lines for `$curr_version'\n";
+    }
+
+  $release_type eq 'major'
+    or print_changelog_deltas ($package_name, $prev_version);
+
+  exit 0;
+}
Index: build-aux/prev-version.txt
===================================================================
RCS file: build-aux/prev-version.txt
diff -N build-aux/prev-version.txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ build-aux/prev-version.txt 21 Oct 2005 09:12:26 -0000
@@ -0,0 +1 @@
+2.0
Index: config/.cvsignore
===================================================================
RCS file: config/.cvsignore
diff -N config/.cvsignore
--- config/.cvsignore 22 May 2005 17:45:28 -0000 1.9
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-*.t
-Makefile
-Makefile.in
Index: config/Makefile.am
===================================================================
RCS file: config/Makefile.am
diff -N config/Makefile.am
--- config/Makefile.am 22 May 2005 17:45:28 -0000 1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-
-EXTRA_DIST = prev-version.txt
Index: config/announce-gen
===================================================================
RCS file: config/announce-gen
diff -N config/announce-gen
--- config/announce-gen 26 Aug 2003 07:13:52 -0000 1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,338 +0,0 @@
-#!/usr/bin/perl -w
-# Generate an announcement message.
-use strict;
-
-use Getopt::Long;
-use Digest::MD5;
-use Digest::SHA1;
-
-(my $VERSION = '$Revision: 1.2 $ ') =~ tr/[0-9].//cd;
-(my $ME = $0) =~ s|.*/||;
-
-my %valid_release_types = map {$_ => 1} qw (alpha beta major);
-
-END
-{
-  # Nobody ever checks the status of print()s.  That's okay, because
-  # if any do fail, we're guaranteed to get an indicator when we close()
-  # the filehandle.
-  #
-  # Close stdout now, and if there were no errors, return happy status.
-  # If stdout has already been closed by the script, though, do nothing.
-  defined fileno STDOUT
-    or return;
-  close STDOUT
-    and return;
-
-  # Errors closing stdout.  Indicate that, and hope stderr is OK.
-  warn "$ME: closing standard output: $!\n";
-
-  # Don't be so arrogant as to assume that we're the first END handler
-  # defined, and thus the last one invoked.  There may be others yet
-  # to come.  $? will be passed on to them, and to the final _exit().
-  #
-  # If it isn't already an error, make it one (and if it _is_ an error,
-  # preserve the value: it might be important).
-  $? ||= 1;
-}
-
-sub usage ($)
-{
-  my ($exit_code) = @_;
-  my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
-  if ($exit_code != 0)
-    {
-      print $STREAM "Try `$ME --help' for more information.\n";
-    }
-  else
-    {
-      my @types = sort keys %valid_release_types;
-      print $STREAM <<EOF;
-Usage: $ME [OPTIONS]
-
-OPTIONS:
-
-  Generate an announcement message.
-
-  FIXME: describe the following
-
-   --release-type=TYPE          TYPE must be one of @types
-   --package-name=PACKAGE_NAME
-   --previous-version=VER
-   --current-version=VER
-   --release-archive-directory=DIR
-   --url-directory=URL_DIR
-   --news=NEWS_FILE             optional
-
-   --help             display this help and exit
-   --version          output version information and exit
-
-EOF
-    }
-  exit $exit_code;
-}
-
-sub print_changelog_deltas ($$)
-{
-  my ($package_name, $prev_version) = @_;
-
-  # Print new ChangeLog entries.
-
-  # First find all CVS-controlled ChangeLog files.
-  use File::Find;
-  my @changelog;
-  find ({wanted => sub {$_ eq 'ChangeLog' && -d 'CVS'
-                         and push @changelog, $File::Find::name}},
-       '.');
-
-  # If there are no ChangeLog files, we're done.
-  @changelog
-    or return;
-  my %changelog = map {$_ => 1} @changelog;
-
-  # Reorder the list of files so that if there are ChangeLog
-  # files in the specified directories, they're listed first,
-  # in this order:
-  my @dir = qw ( . src lib m4 config doc );
-
-  # A typical @changelog array might look like this:
-  # ./ChangeLog
-  # ./po/ChangeLog
-  # ./m4/ChangeLog
-  # ./lib/ChangeLog
-  # ./doc/ChangeLog
-  # ./config/ChangeLog
-  my @reordered;
-  foreach my $d (@dir)
-    {
-      my $dot_slash = $d eq '.' ? $d : "./$d";
-      my $target = "$dot_slash/ChangeLog";
-      delete $changelog{$target}
-       and push @reordered, $target;
-    }
-
-  # Append any remaining ChangeLog files.
-  push @reordered, sort keys %changelog;
-
-  # Remove leading `./'.
-  @reordered = map { s!^\./!!; $_ } @reordered;
-
-  print "\nChangeLog entries:\n\n";
-  # print join ("\n", @reordered), "\n";
-
-  $prev_version =~ s/\./_/g;
-  my $prev_cvs_tag = "\U$package_name\E-$prev_version";
-
-  my $cmd = "cvs -n diff -u -r$prev_cvs_tag -rHEAD @reordered";
-  open DIFF, '-|', $cmd
-    or die "$ME: cannot run `$cmd': $!\n";
-  # Print two types of lines, making minor changes:
-  # Lines starting with `+++ ', e.g.,
-  # +++ ChangeLog   22 Feb 2003 16:52:51 -0000      1.247
-  # and those starting with `+'.
-  # Don't print the others.
-  my $prev_printed_line_empty = 1;
-  while (defined (my $line = <DIFF>))
-    {
-      if ($line =~ /^\+\+\+ /)
-       {
-         my $separator = "*"x70 ."\n";
-         $line =~ s///;
-         $line =~ s/\s.*//;
-         $prev_printed_line_empty
-           or print "\n";
-         print $separator, $line, $separator;
-       }
-      elsif ($line =~ /^\+/)
-       {
-         $line =~ s///;
-         print $line;
-         $prev_printed_line_empty = ($line =~ /^$/);
-       }
-    }
-  close DIFF;
-
-  # The exit code should be 1.
-  # Allow in case there are no modified ChangeLog entries.
-  $? == 256 || $? == 128
-    or warn "$ME: warning: `cmd' had unexpected exit code or signal ($?)\n";
-}
-
-{
-  my $release_type;
-  my $package_name;
-  my $prev_version;
-  my $curr_version;
-  my $release_archive_dir;
-  my @url_dir_list;
-  my $news_file;
-
-  GetOptions
-    (
-     'release-type=s' => \$release_type,
-     'package-name=s' => \$package_name,
-     'previous-version=s' => \$prev_version,
-     'current-version=s' => \$curr_version,
-     'release-archive-directory=s' => \$release_archive_dir,
-     'url-directory=s@' => address@hidden,
-     'news=s@' => \$news_file,
-
-     help => sub { usage 0 },
-     version => sub { print "$ME version $VERSION\n"; exit },
-    ) or usage 1;
-
-  my $fail = 0;
-  # Ensure that sure each required option is specified.
-  $release_type
-    or (warn "$ME: release type not specified\n"), $fail = 1;
-  $package_name
-    or (warn "$ME: package name not specified\n"), $fail = 1;
-  $prev_version
-    or (warn "$ME: previous version string not specified\n"), $fail = 1;
-  $curr_version
-    or (warn "$ME: current version string not specified\n"), $fail = 1;
-  $release_archive_dir
-    or (warn "$ME: release directory name not specified\n"), $fail = 1;
-  @url_dir_list
-    or (warn "$ME: URL directory name(s) not specified\n"), $fail = 1;
-
-  exists $valid_release_types{$release_type}
-    or (warn "$ME: `$release_type': invalid release type\n"), $fail = 1;
-
-  @ARGV
-    and (warn "$ME: too many arguments\n"), $fail = 1;
-  $fail
-    and usage 1;
-
-  my $my_distdir = "$package_name-$curr_version";
-  my $tgz = "$my_distdir.tar.gz";
-  my $tbz = "$my_distdir.tar.bz2";
-  my $xd = "$package_name-$prev_version-$curr_version.xdelta";
-
-  my %size;
-
-  foreach my $f (($tgz, $tbz, $xd))
-    {
-      my $cmd = "du --human $f";
-      my $t = `$cmd`;
-      # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS
-      $@
-       and (warn "$ME: command failed: `$cmd'\n"), $fail = 1;
-      chomp $t;
-      $t =~ s/^([\d.]+[MkK]).*/${1}B/;
-      $size{$f} = $t;
-    }
-
-  $fail
-    and exit 1;
-
-  # The markup is escaped as <\# so that when this script is sent by
-  # mail (or part of a diff), Gnus is not triggered.
-  print <<EOF;
-
-Subject: $my_distdir released
-
-<\#secure method=pgpmime mode=sign>
-
-FIXME: put comments here
-
-EOF
-
-  print "Here are the compressed sources:\n";
-  foreach my $url (@url_dir_list)
-    {
-      print "  $url/$tgz   ($size{$tgz})\n";
-      print "  $url/$tbz  ($size{$tbz})\n";
-    }
-
-  print "\nAnd here are xdelta-style diffs:\n";
-  foreach my $url (@url_dir_list)
-    {
-      print "  $url/$xd   ($size{$xd})\n";
-    }
-
-  print "\nHere are GPG detached signatures:\n";
-  foreach my $url (@url_dir_list)
-    {
-      print "  $url/$tgz.asc\n";
-      print "  $url/$tbz.asc\n";
-    }
-
-  # FIXME: clean up upon interrupt or die
-  my $tmpdir = $ENV{TMPDIR} || '/tmp';
-  my $tmp = "$tmpdir/$ME-$$";
-  unlink $tmp;  # ignore failure
-
-  print "\nHere are the MD5 and SHA1 signatures:\n";
-  print "\n";
-  # The markup is escaped as <\# so that when this script is sent by
-  # mail (or part of a diff), Gnus is not triggered.
-  print "<\#part type=text/plain filename=\"$tmp\" disposition=inline>\n"
-    . "<\#/part>\n";
-
-  open OUT, '>', $tmp
-    or die "$ME: $tmp: cannot open for writing: $!\n";
-
-  foreach my $meth (qw (md5 sha1))
-    {
-      foreach my $f (($tgz, $tbz, $xd))
-       {
-         open IN, '<', $f
-           or die "$ME: $f: cannot open for reading: $!\n";
-         binmode IN;
-         my $dig =
-           ($meth eq 'md5'
-            ? Digest::MD5->new->addfile(*IN)->hexdigest
-            : Digest::SHA1->new->addfile(*IN)->hexdigest);
-         close IN;
-         print OUT "$dig  $f\n";
-       }
-    }
-
-  close OUT
-    or die "$ME: $tmp: while writing: $!\n";
-  chmod 0400, $tmp;  # ignore failure
-
-  if ($news_file)
-    {
-      print "\nNEWS\n\n";
-
-      # Print all lines from $news_file, starting with the first one
-      # that mentions $curr_version up to but not including
-      # the first occurrence of $prev_version.
-      my $in_items;
-      open NEWS, '<', $news_file
-       or die "$ME: $news_file: cannot open for reading: $!\n";
-      while (defined (my $line = <NEWS>))
-       {
-         if ( ! $in_items)
-           {
-             # Match lines like this one:
-             # * Major changes in release 5.0.1:
-             # but not any other line that starts with a space, *, or -.
-             $line =~ /^(\* Major changes.*|[^ *-].*)\Q$curr_version\E/o
-               or next;
-             $in_items = 1;
-             print $line;
-           }
-         else
-           {
-             # Be careful that this regexp cannot match version numbers
-             # in NEWS items -- they might well say `introduced in 4.5.5',
-             # and we don't want that to match.
-             $line =~ /^(\* Major changes.*|[^ *-].*)\Q$prev_version\E/o
-               and last;
-             print $line;
-           }
-       }
-      close NEWS;
-
-      $in_items
-       or die "$ME: $news_file: no matching lines for `$curr_version'\n";
-    }
-
-  $release_type eq 'major'
-    or print_changelog_deltas ($package_name, $prev_version);
-
-  exit 0;
-}
Index: config/prev-version.txt
===================================================================
RCS file: config/prev-version.txt
diff -N config/prev-version.txt
--- config/prev-version.txt 22 May 2005 17:45:28 -0000 1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
-2.0





reply via email to

[Prev in Thread] Current Thread [Next in Thread]